Documentation
¶
Overview ¶
Package httpclient provides a shared HTTP client for all external API calls. The client is safe for concurrent use and reuses connections. Call Init once during startup to set the timeout; the default is 10s.
Index ¶
Constants ¶
View Source
const MaxResponseSize = 1 << 20
MaxResponseSize limits HTTP response bodies to 1 MB to prevent OOM.
Variables ¶
This section is empty.
Functions ¶
func GetJSON ¶
GetJSON performs a GET request and returns the response body as bytes. Returns an error for non-2xx status codes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.