···13131414 {2 Security}
15151616- Per {{:https://datatracker.ietf.org/doc/html/rfc7617#section-4}RFC 7617 Section 4}} and
1717- {{:https://datatracker.ietf.org/doc/html/rfc6750#section-5.1}RFC 6750 Section 5.1}},
1616+ Per {{:https://datatracker.ietf.org/doc/html/rfc7617#section-4}RFC 7617 Section 4} and
1717+ {{:https://datatracker.ietf.org/doc/html/rfc6750#section-5.1}RFC 6750 Section 5.1},
1818 Basic, Bearer, and Digest authentication transmit credentials that MUST be
1919 protected by TLS. The library enforces HTTPS by default for these schemes. *)
2020
+2-2
lib/headers.mli
···66(** HTTP header field handling per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-5}RFC 9110 Section 5}
7788 This module provides an efficient implementation of HTTP headers with
99- case-insensitive field names per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-5.1}RFC 9110 Section 5.1}}.
99+ case-insensitive field names per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-5.1}RFC 9110 Section 5.1}.
1010 Headers can have multiple values for the same field name (e.g., Set-Cookie).
11111212 {2 Security}
13131414 Header names and values are validated to prevent HTTP header injection
1515 attacks. CR and LF characters are rejected per
1616- {{:https://datatracker.ietf.org/doc/html/rfc9110#section-5.5}RFC 9110 Section 5.5}}.
1616+ {{:https://datatracker.ietf.org/doc/html/rfc9110#section-5.5}RFC 9110 Section 5.5}.
17171818 {2 Examples}
1919
+1-1
lib/method.mli
···1111 {2 Safe Methods}
12121313 Methods are considered "safe" if their semantics are read-only (GET, HEAD,
1414- OPTIONS, TRACE). Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-9.2.1}RFC 9110 Section 9.2.1}}.
1414+ OPTIONS, TRACE). Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-9.2.1}RFC 9110 Section 9.2.1}.
15151616 {2 Idempotent Methods}
1717
+2-2
lib/one.mli
···1010 Each request opens a new TCP connection (with TLS for https://) that is
1111 closed when the Eio switch closes.
12121313- Implements {{:https://datatracker.ietf.org/doc/html/rfc9112}RFC 9112}} (HTTP/1.1)
1414- with {{:https://datatracker.ietf.org/doc/html/rfc9110}RFC 9110}} semantics.
1313+ Implements {{:https://datatracker.ietf.org/doc/html/rfc9112}RFC 9112} (HTTP/1.1)
1414+ with {{:https://datatracker.ietf.org/doc/html/rfc9110}RFC 9110} semantics.
15151616 For stateful requests with automatic cookie handling, connection pooling,
1717 and persistent configuration, use the main {!Requests} module instead.
+4-4
lib/requests.mli
···107107108108 {b Exception-Based Errors:}
109109110110- All request functions may raise exceptions from the {!Error} module:
110110+ All request functions may raise exceptions from the {!module:Error} module:
111111 - {!exception:Error.Timeout}: Request exceeded timeout limit
112112 - {!exception:Error.ConnectionError}: Network connection failed
113113 - {!exception:Error.TooManyRedirects}: Exceeded maximum redirect count
···161161 log_error "Unexpected error: %s" (Printexc.to_string exn)
162162 ]}
163163164164- The {!Error} module also provides a Result-based API for functional error
164164+ The {!module:Error} module also provides a Result-based API for functional error
165165 handling, though the primary API uses exceptions for better integration
166166 with Eio's structured concurrency.
167167···284284 HTTP requests use absolute-URI form (RFC 9112 Section 3.2.2).
285285 HTTPS requests use CONNECT tunneling (RFC 9110 Section 9.3.6).
286286 @param allow_insecure_auth Allow Basic/Bearer/Digest authentication over plaintext HTTP (default: false).
287287- Per {{:https://datatracker.ietf.org/doc/html/rfc7617#section-4}RFC 7617 Section 4}} and
288288- {{:https://datatracker.ietf.org/doc/html/rfc6750#section-5.1}RFC 6750 Section 5.1}},
287287+ Per {{:https://datatracker.ietf.org/doc/html/rfc7617#section-4}RFC 7617 Section 4} and
288288+ {{:https://datatracker.ietf.org/doc/html/rfc6750#section-5.1}RFC 6750 Section 5.1},
289289 these auth schemes transmit credentials that SHOULD be protected by TLS.
290290 {b Only set to [true] for local development or testing environments.}
291291 Example for local dev server:
+1-1
lib/response.mli
···99 status codes, headers, and response bodies. Responses support streaming
1010 to efficiently handle large payloads.
11111212- Caching semantics follow {{:https://datatracker.ietf.org/doc/html/rfc9111}RFC 9111}} (HTTP Caching).
1212+ Caching semantics follow {{:https://datatracker.ietf.org/doc/html/rfc9111}RFC 9111} (HTTP Caching).
13131414 {2 Examples}
1515
+2-2
lib/retry.mli
···7788 This module provides configurable retry logic for HTTP requests,
99 including exponential backoff, custom retry predicates, and
1010- Retry-After header support per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-10.2.3}RFC 9110 Section 10.2.3}}.
1010+ Retry-After header support per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-10.2.3}RFC 9110 Section 10.2.3}.
11111212 {2 Custom Retry Predicates}
1313···106106107107(** Parse Retry-After header value (seconds or HTTP date).
108108109109- Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-10.2.3}RFC 9110 Section 10.2.3}},
109109+ Per {{:https://datatracker.ietf.org/doc/html/rfc9110#section-10.2.3}RFC 9110 Section 10.2.3},
110110 Retry-After can be either:
111111 - A non-negative integer (delay in seconds)
112112 - An HTTP-date (absolute time to retry after)