loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig.
(buf []byte)
| 2507 | |
| 2508 | // loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig. |
| 2509 | func loadHTTPConfigJSON(buf []byte) (*HTTPClientConfig, error) { |
| 2510 | cfg := &HTTPClientConfig{} |
| 2511 | err := json.Unmarshal(buf, cfg) |
| 2512 | if err != nil { |
| 2513 | return nil, err |
| 2514 | } |
| 2515 | return cfg, nil |
| 2516 | } |
| 2517 | |
| 2518 | // loadHTTPConfigJSONFile parses the given JSON file into a HTTPClientConfig. |
| 2519 | func loadHTTPConfigJSONFile(filename string) (*HTTPClientConfig, []byte, error) { |
no outgoing calls
no test coverage detected