loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig.
(buf []byte)
| 1915 | |
| 1916 | // loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig. |
| 1917 | func loadHTTPConfigJSON(buf []byte) (*HTTPClientConfig, error) { |
| 1918 | cfg := &HTTPClientConfig{} |
| 1919 | err := json.Unmarshal(buf, cfg) |
| 1920 | if err != nil { |
| 1921 | return nil, err |
| 1922 | } |
| 1923 | return cfg, nil |
| 1924 | } |
| 1925 | |
| 1926 | // loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig. |
| 1927 | func loadHTTPConfigJSONFile(filename string) (*HTTPClientConfig, []byte, error) { |
no outgoing calls
no test coverage detected