Http module

Client

structSource

What requests have in common.

Fields

base_url: string
Relative request URLs (/users/1) are joined to this: "http://localhost:8080".
headers: [..] Header_Field
Sent with every request that does not set the header itself (an Authorization token).
timeout: := 30_000
Milliseconds for a request that does not set its own timeout.
max_redirects: := 10
Redirects followed for a request that does not set its own max_redirects (0: none).
transport: Transport
tls: *Tls.Tls_Config
The TLS settings for https:// URLs; null: trust the system's roots and offer http/1.1 (a config the client makes once for the whole program). A config of your own must have gone through Tls.tls_config_init and must outlive the client's connections.

See also