Skip to main content

Module http_client

Module http_client 

Source
Expand description

Bounded HTTP client: connection reuse via a single Agent, capped concurrency.

Structs§

HttpClient
HTTP client: one Agent (connection reuse), bounded concurrent requests.

Functions§

get
GET url and return body (uses global bounded client).
get_to_file
GET url and write to file (uses global bounded client).
get_with_accept
GET url with optional Accept header (e.g. application/vnd.npm.install-v1+json for abbreviated packument).
post_json
POST JSON body to url (uses global bounded client).