loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig.
(filename string)
| 2517 | |
| 2518 | // loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig. |
| 2519 | func loadHTTPConfigJSONFile(filename string) (*HTTPClientConfig, []byte, error) { |
| 2520 | content, err := os.ReadFile(filename) |
| 2521 | if err != nil { |
| 2522 | return nil, nil, err |
| 2523 | } |
| 2524 | cfg, err := loadHTTPConfigJSON(content) |
| 2525 | if err != nil { |
| 2526 | return nil, nil, err |
| 2527 | } |
| 2528 | return cfg, content, nil |
| 2529 | } |
| 2530 | |
| 2531 | func TestProxyConfig_Proxy(t *testing.T) { |
| 2532 | var proxyServer *httptest.Server |
nothing calls this directly
no test coverage detected