HttpResponse
An immutable response: status, the URL it came from, headers, the redirect chain that led to it and the body.
Stable Core. Built with the factory HttpResponse(status, url) { headers = ...; redirectChain = ...; body(bytes) }. The body and the chain are copied in and read back as copies, so a response shared by several callers cannot be changed by one of them. Equality is identity. toString() prints the status, the redacted URL, the header names, the body size and the number of redirects, never a header value or the body. A transport maps a status outside 100..599 to TransportFailure.Protocol rather than build a response.
Types
Link copied to clipboard
Collects the optional parts of an HttpResponse. Not thread-safe; use it only inside the factory's lambda.