loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig.
(filename string)
| 1925 | |
| 1926 | // loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig. |
| 1927 | func loadHTTPConfigJSONFile(filename string) (*HTTPClientConfig, []byte, error) { |
| 1928 | content, err := os.ReadFile(filename) |
| 1929 | if err != nil { |
| 1930 | return nil, nil, err |
| 1931 | } |
| 1932 | cfg, err := loadHTTPConfigJSON(content) |
| 1933 | if err != nil { |
| 1934 | return nil, nil, err |
| 1935 | } |
| 1936 | return cfg, content, nil |
| 1937 | } |
| 1938 | |
| 1939 | func TestProxyConfig_Proxy(t *testing.T) { |
| 1940 | var proxyServer *httptest.Server |
nothing calls this directly
no test coverage detected