(transport http.RoundTripper)
| 57 | } |
| 58 | |
| 59 | func NewMockHttpClientWithTransport(transport http.RoundTripper) *http.Client { |
| 60 | httpClient := &http.Client{} |
| 61 | httpClient.Transport = transport |
| 62 | return httpClient |
| 63 | } |
| 64 | |
| 65 | // ReadJson reads from `body`, then calls json.Unmarshal to try load JSON into object of type T |
| 66 | // NOTE max length of 8k |
no outgoing calls