class
Cryload::Request
- Cryload::Request
- Reference
- Object
Overview
One measured HTTP request, including any redirect hops it followed.
The response body is streamed through a caller-owned scratch buffer instead
of being materialised as a String. That removes a per-request allocation
proportional to the response size and is what makes time-to-first-byte
observable at all: the block form of HTTP::Client#exec hands the response
over as soon as the status line and headers are parsed.
Defined in:
cryload/request.crConstant Summary
-
DRAIN_BUFFER_SIZE =
32 * 1024 -
REDIRECT_STATUS_CODES =
{301, 302, 303, 307, 308}
Constructors
Class Method Summary
Instance Method Summary
- #connect_ms : Float64 | Nil
- #corrected_ms : Float64
- #dns_ms : Float64 | Nil
- #response_bytes : Int64
- #send_delay_ms : Float64
- #status_code : Int32
- #tls_ms : Float64 | Nil
- #total_ms : Float64
- #ttfb_ms : Float64
Constructor Detail
def self.new(client : PhasedClient, uri : URI, spec : RequestSpec, headers : HTTP::Headers, buffer : Bytes, scheduled_at : Time::Instant | Nil = nil)
#