HTTPClientFor returns a single use HTTP client for the given peer. The client does not verify the peer's certificate.
(pid peer.ID)
| 56 | // HTTPClientFor returns a single use HTTP client for the given peer. |
| 57 | // The client does not verify the peer's certificate. |
| 58 | func (n *network) HTTPClientFor(pid peer.ID) *http.Client { |
| 59 | if pid == "" { |
| 60 | return defaultHttpClient |
| 61 | } |
| 62 | |
| 63 | return &http.Client{ |
| 64 | Transport: n.transportFor(pid), |
| 65 | Timeout: defaultTimeout, |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // RoundTripperFor returns a single use round tripper for the given peer. |
| 70 | // The peer is expected to provide a valid certificate. |
nothing calls this directly
no test coverage detected