AshHooks.Http.Bounded (AshHooks v2.0.3)

Copy Markdown View Source

The default AshHooks.Http adapter: HTTP/1.1 over :gen_tcp and :ssl, with bounded response collection and one operation deadline.

Each connection carries one request with Connection: close. The adapter returns redirects without following them and consumes informational responses before the final response, with a default limit of eight interim responses. It connects to a validated, pinned IP address while retaining the original host for the HTTP authority, TLS SNI, and certificate verification.

Defaults are 32 KiB for cumulative response headers, 64 KiB for the retained body, five seconds for connection setup, and 15 seconds for the complete operation. The operation deadline includes DNS, connection, send, and reads. Options may override those limits.

Body limits apply to Content-Length, chunked, and read-to-close responses. Collection stops at the cap and closes the connection without draining the remainder. Before the cap is reached, an early close in a Content-Length or chunked response returns {:error, :truncated_body}. Read-to-close framing ends normally when the peer closes.

TLS uses the OTP CA store unless cacerts: der_list supplies a private CA bundle through the adapter options or worker's http_opts. Literal HTTPS IP addresses must also match the certificate's IP subject alternative name. See AshHooks.Http.Httpc for the alternative adapter's buffering limitations.