Request
Fields of this type
Fields
- client:*Client
- connection:?*Connection
- This is null when the connection is released.
- reader:http.Reader
- keep_alive:bool
- method:http.Method
- version:http.Version
- = .@"HTTP/1.1"
- accept_encoding:@TypeOf(default_accept_encoding)
- = default_accept_encoding
- handle_continue:bool
- Whether the request should handle a 100-continue response before sending the request body.
- response_content_length:?u64
- Populated in `receiveHead`; used in `deinit` to determine whether to
- response_transfer_encoding:http.TransferEncoding
- Populated in `receiveHead`; used in `deinit` to determine whether to
- extra_headers:[]const http.Header
- These headers are kept including when following a redirect to a
- privileged_headers:[]const http.Header
- These headers are stripped when following a redirect to a different
Type definitions in this namespace
Types
- RedirectBehavior
- Any value other than `not_allowed` or `unhandled` means that integer represents
Returns the request's `Connection` back to the pool of the `Client`.
Functions
- deinit
- Returns the request's `Connection` back to the pool of the `Client`.
- sendBodiless
- Sends and flushes a complete request as only HTTP head, no body.
- sendBodilessUnflushed
- Sends but does not flush a complete request as only HTTP head, no body.
- sendBody
- Transfers the HTTP head over the connection and flushes.
- sendBodyComplete
- Transfers the HTTP head and body over the connection and flushes.
- sendBodyUnflushed
- Transfers the HTTP head over the connection, which is not flushed until
- receiveHead
- If handling redirects and the request has no payload, then this
Error sets in this namespace
Error Sets
= b: { var result: [@typeInfo(http.ContentEncoding).@"enum".fields.len]bool = @splat(false); result[@intFromEnum(http.ContentEncoding.gzip)] = true; result[@intFromEnum(http.ContentEncoding.deflate)] = true; result[@intFromEnum(http.ContentEncoding.identity)] = true; break :b result; }
Values
- default_accept_encoding
- = b: { var result: [@typeInfo(http.ContentEncoding).@"enum".fields.len]bool = @splat(false); result[@intFromEnum(http.ContentEncoding.gzip)] = true; result[@intFromEnum(http.ContentEncoding.deflate)] = true; result[@intFromEnum(http.ContentEncoding.identity)] = true; break :b result; }