struct Protocol::Network::ResponseReceivedExtraInfo

Overview

Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.

Included Modules

Defined in:

protocol/network.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def blocked_cookies : Array(BlockedSetCookieWithReason) #

A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.


[View source]
def headers : Headers #

Raw response headers as they were received over the wire.


[View source]
def headers_text : String | Nil #

Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.


[View source]
def request_id : RequestId #

Request identifier. Used to match this information to another responseReceived event.


[View source]
def resource_ip_address_space : IPAddressSpace #

The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.


[View source]
def status_code : Int::Primitive #

The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.


[View source]