Expand description
Incoming response type.
A Response holds the HTTP status, version, headers, final URL, and a
body handle. The body can be consumed in two ways:
- Buffered:
bytes()ortext()collects the entire body. - Streaming:
bytes_stream()yields decoded body chunks incrementally;raw_bytes_stream()selects encoded chunks for compressed responses.
§Body ownership
The body can be consumed exactly once. After calling bytes(),
text(), bytes_stream(), or raw_bytes_stream(), further reads return
an error.
Structs§
- History
Entry - A metadata-only snapshot of a redirect response.
- Response
- An HTTP response.