| 1 | package types |
| 2 | |
| 3 | import "net/http" |
| 4 | |
| 5 | // HTTPClient is the interface shoutrrr uses for all outbound HTTP operations. |
| 6 | // |
| 7 | // Implementations must be safe for concurrent use. *http.Client satisfies this interface. |
| 8 | type HTTPClient interface { |
| 9 | Do(req *http.Request) (*http.Response, error) |
| 10 | } |
| 11 | |
| 12 | // HTTPClientSetter is implemented by services that accept a custom HTTP client |
| 13 | // for all outbound requests. This enables callers to control egress, TLS settings, |
| 14 | // proxies, and timeouts without global side effects. |
| 15 | type HTTPClientSetter interface { |
| 16 | SetHTTPClient(client HTTPClient) |
| 17 | } |