Documentation ¶
Overview ¶
Package network implements the Network domain. Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AuthChallenge
- type AuthChallengeResponse
- type BlockedCookieWithReason
- type BlockedReason
- type BlockedSetCookieWithReason
- type CachedResource
- type CanClearBrowserCacheReply
- type CanClearBrowserCookiesReply
- type CanEmulateNetworkConditionsReply
- type CertificateTransparencyCompliance
- type ConnectionType
- type ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetAuthChallengeResponse(authChallengeResponse AuthChallengeResponse) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetHeaders(headers Headers) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetMethod(method string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetPostData(postData string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetRawResponse(rawResponse string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetURL(url string) *ContinueInterceptedRequestArgs
- type Cookie
- type CookieBlockedReason
- type CookieParam
- type CookiePriority
- type CookieSameSite
- type DataReceivedClient
- type DataReceivedReply
- type DeleteCookiesArgs
- type EmulateNetworkConditionsArgs
- type EnableArgs
- type ErrorReason
- type EventSourceMessageReceivedClient
- type EventSourceMessageReceivedReply
- type GetAllCookiesReply
- type GetCertificateArgs
- type GetCertificateReply
- type GetCookiesArgs
- type GetCookiesReply
- type GetRequestPostDataArgs
- type GetRequestPostDataReply
- type GetResponseBodyArgs
- type GetResponseBodyForInterceptionArgs
- type GetResponseBodyForInterceptionReply
- type GetResponseBodyReply
- type Headers
- type Initiator
- type InterceptionID
- type InterceptionStage
- type LoaderID
- type LoadingFailedClient
- type LoadingFailedReply
- type LoadingFinishedClient
- type LoadingFinishedReply
- type MonotonicTime
- type ReplayXHRArgs
- type Request
- type RequestID
- type RequestInterceptedClient
- type RequestInterceptedReply
- type RequestPattern
- type RequestServedFromCacheClient
- type RequestServedFromCacheReply
- type RequestWillBeSentClient
- type RequestWillBeSentExtraInfoClient
- type RequestWillBeSentExtraInfoReply
- type RequestWillBeSentReply
- type ResourceChangedPriorityClient
- type ResourceChangedPriorityReply
- type ResourcePriority
- type ResourceTiming
- type ResourceType
- type Response
- type ResponseReceivedClient
- type ResponseReceivedExtraInfoClient
- type ResponseReceivedExtraInfoReply
- type ResponseReceivedReply
- type SearchInResponseBodyArgs
- type SearchInResponseBodyReply
- type SecurityDetails
- type SetBlockedURLsArgs
- type SetBypassServiceWorkerArgs
- type SetCacheDisabledArgs
- type SetCookieArgs
- func (a *SetCookieArgs) SetDomain(domain string) *SetCookieArgs
- func (a *SetCookieArgs) SetExpires(expires TimeSinceEpoch) *SetCookieArgs
- func (a *SetCookieArgs) SetHTTPOnly(httpOnly bool) *SetCookieArgs
- func (a *SetCookieArgs) SetPath(path string) *SetCookieArgs
- func (a *SetCookieArgs) SetPriority(priority CookiePriority) *SetCookieArgs
- func (a *SetCookieArgs) SetSameSite(sameSite CookieSameSite) *SetCookieArgs
- func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs
- func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs
- type SetCookieBlockedReason
- type SetCookieReply
- type SetCookiesArgs
- type SetDataSizeLimitsForTestArgs
- type SetExtraHTTPHeadersArgs
- type SetRequestInterceptionArgs
- type SignedCertificateTimestamp
- type SignedExchangeError
- type SignedExchangeErrorField
- type SignedExchangeHeader
- type SignedExchangeInfo
- type SignedExchangeReceivedClient
- type SignedExchangeReceivedReply
- type SignedExchangeSignature
- type TakeResponseBodyForInterceptionAsStreamArgs
- type TakeResponseBodyForInterceptionAsStreamReply
- type TimeSinceEpoch
- type WebSocketClosedClient
- type WebSocketClosedReply
- type WebSocketCreatedClient
- type WebSocketCreatedReply
- type WebSocketFrame
- type WebSocketFrameErrorClient
- type WebSocketFrameErrorReply
- type WebSocketFrameReceivedClient
- type WebSocketFrameReceivedReply
- type WebSocketFrameSentClient
- type WebSocketFrameSentReply
- type WebSocketHandshakeResponseReceivedClient
- type WebSocketHandshakeResponseReceivedReply
- type WebSocketRequest
- type WebSocketResponse
- type WebSocketWillSendHandshakeRequestClient
- type WebSocketWillSendHandshakeRequestReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthChallenge ¶
type AuthChallenge struct { // Source Source of the authentication challenge. // // Values: "Server", "Proxy". Source *string `json:"source,omitempty"` Origin string `json:"origin"` // Origin of the challenger. Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest Realm string `json:"realm"` // The realm of the challenge. May be empty. }
AuthChallenge Authorization challenge for HTTP status code 401 or 407.
Note: This type is experimental.
type AuthChallengeResponse ¶
type AuthChallengeResponse struct { // Response The decision on what to do in response to the // authorization challenge. Default means deferring to the default // behavior of the net stack, which will likely either the Cancel // authentication or display a popup dialog box. // // Values: "Default", "CancelAuth", "ProvideCredentials". Response string `json:"response"` Username *string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials. Password *string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials. }
AuthChallengeResponse Response to an AuthChallenge.
Note: This type is experimental.
type BlockedCookieWithReason ¶ added in v0.25.0
type BlockedCookieWithReason struct { BlockedReasons []CookieBlockedReason `json:"blockedReasons"` // The reason(s) the cookie was blocked. Cookie Cookie `json:"cookie"` // The cookie object representing the cookie which was not sent. }
BlockedCookieWithReason A cookie with was not sent with a request with the corresponding reason.
Note: This type is experimental.
type BlockedReason ¶
type BlockedReason string
BlockedReason The reason why request was blocked.
const ( BlockedReasonNotSet BlockedReason = "" BlockedReasonOther BlockedReason = "other" BlockedReasonCsp BlockedReason = "csp" BlockedReasonMixedContent BlockedReason = "mixed-content" BlockedReasonOrigin BlockedReason = "origin" BlockedReasonInspector BlockedReason = "inspector" BlockedReasonSubresourceFilter BlockedReason = "subresource-filter" BlockedReasonContentType BlockedReason = "content-type" BlockedReasonCollapsedByClient BlockedReason = "collapsed-by-client" BlockedReasonCoepFrameResourceNeedsCoepHeader BlockedReason = "coep-frame-resource-needs-coep-header" BlockedReasonCorpNotSameOrigin BlockedReason = "corp-not-same-origin" BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep" BlockedReasonCorpNotSameSite BlockedReason = "corp-not-same-site" )
BlockedReason as enums.
func (BlockedReason) String ¶
func (e BlockedReason) String() string
func (BlockedReason) Valid ¶
func (e BlockedReason) Valid() bool
type BlockedSetCookieWithReason ¶ added in v0.25.0
type BlockedSetCookieWithReason struct { BlockedReasons []SetCookieBlockedReason `json:"blockedReasons"` // The reason(s) this cookie was blocked. CookieLine string `json:"cookieLine"` // The string representing this individual cookie as it would appear in the header. This is not the entire "cookie" or "set-cookie" header which could have multiple cookies. Cookie *Cookie `json:"cookie,omitempty"` // The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors. }
BlockedSetCookieWithReason A cookie which was not stored from a response with the corresponding reason.
Note: This type is experimental.
type CachedResource ¶
type CachedResource struct { URL string `json:"url"` // Resource URL. This is the url of the original network request. Type ResourceType `json:"type"` // Type of this resource. Response *Response `json:"response,omitempty"` // Cached response data. BodySize float64 `json:"bodySize"` // Cached response body size. }
CachedResource Information about the cached resource.
type CanClearBrowserCacheReply ¶
type CanClearBrowserCacheReply struct {
Result bool `json:"result"` // True if browser cache can be cleared.
}
CanClearBrowserCacheReply represents the return values for CanClearBrowserCache in the Network domain.
type CanClearBrowserCookiesReply ¶
type CanClearBrowserCookiesReply struct {
Result bool `json:"result"` // True if browser cookies can be cleared.
}
CanClearBrowserCookiesReply represents the return values for CanClearBrowserCookies in the Network domain.
type CanEmulateNetworkConditionsReply ¶
type CanEmulateNetworkConditionsReply struct {
Result bool `json:"result"` // True if emulation of network conditions is supported.
}
CanEmulateNetworkConditionsReply represents the return values for CanEmulateNetworkConditions in the Network domain.
type CertificateTransparencyCompliance ¶ added in v0.17.4
type CertificateTransparencyCompliance string
CertificateTransparencyCompliance Whether the request complied with Certificate Transparency policy.
const ( CertificateTransparencyComplianceNotSet CertificateTransparencyCompliance = "" CertificateTransparencyComplianceUnknown CertificateTransparencyCompliance = "unknown" CertificateTransparencyComplianceNotCompliant CertificateTransparencyCompliance = "not-compliant" CertificateTransparencyComplianceCompliant CertificateTransparencyCompliance = "compliant" )
CertificateTransparencyCompliance as enums.
func (CertificateTransparencyCompliance) String ¶ added in v0.17.4
func (e CertificateTransparencyCompliance) String() string
func (CertificateTransparencyCompliance) Valid ¶ added in v0.17.4
func (e CertificateTransparencyCompliance) Valid() bool
type ConnectionType ¶
type ConnectionType string
ConnectionType The underlying connection technology that the browser is supposedly using.
const ( ConnectionTypeNotSet ConnectionType = "" ConnectionTypeNone ConnectionType = "none" ConnectionTypeCellular2g ConnectionType = "cellular2g" ConnectionTypeCellular3g ConnectionType = "cellular3g" ConnectionTypeCellular4g ConnectionType = "cellular4g" ConnectionTypeBluetooth ConnectionType = "bluetooth" ConnectionTypeEthernet ConnectionType = "ethernet" ConnectionTypeWifi ConnectionType = "wifi" ConnectionTypeWimax ConnectionType = "wimax" ConnectionTypeOther ConnectionType = "other" )
ConnectionType as enums.
func (ConnectionType) String ¶
func (e ConnectionType) String() string
func (ConnectionType) Valid ¶
func (e ConnectionType) Valid() bool
type ContinueInterceptedRequestArgs ¶
type ContinueInterceptedRequestArgs struct { InterceptionID InterceptionID `json:"interceptionId"` // No description. ErrorReason ErrorReason `json:"errorReason,omitempty"` // If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge. RawResponse *string `json:"rawResponse,omitempty"` // If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. URL *string `json:"url,omitempty"` // If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. Method *string `json:"method,omitempty"` // If set this allows the request method to be overridden. Must not be set in response to an authChallenge. PostData *string `json:"postData,omitempty"` // If set this allows postData to be set. Must not be set in response to an authChallenge. Headers Headers `json:"headers,omitempty"` // If set this allows the request headers to be changed. Must not be set in response to an authChallenge. AuthChallengeResponse *AuthChallengeResponse `json:"authChallengeResponse,omitempty"` // Response to a requestIntercepted with an authChallenge. Must not be set otherwise. }
ContinueInterceptedRequestArgs represents the arguments for ContinueInterceptedRequest in the Network domain.
func NewContinueInterceptedRequestArgs ¶
func NewContinueInterceptedRequestArgs(interceptionID InterceptionID) *ContinueInterceptedRequestArgs
NewContinueInterceptedRequestArgs initializes ContinueInterceptedRequestArgs with the required arguments.
func (*ContinueInterceptedRequestArgs) SetAuthChallengeResponse ¶
func (a *ContinueInterceptedRequestArgs) SetAuthChallengeResponse(authChallengeResponse AuthChallengeResponse) *ContinueInterceptedRequestArgs
SetAuthChallengeResponse sets the AuthChallengeResponse optional argument. Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
func (*ContinueInterceptedRequestArgs) SetErrorReason ¶
func (a *ContinueInterceptedRequestArgs) SetErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestArgs
SetErrorReason sets the ErrorReason optional argument. If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetHeaders ¶
func (a *ContinueInterceptedRequestArgs) SetHeaders(headers Headers) *ContinueInterceptedRequestArgs
SetHeaders sets the Headers optional argument. If set this allows the request headers to be changed. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetMethod ¶
func (a *ContinueInterceptedRequestArgs) SetMethod(method string) *ContinueInterceptedRequestArgs
SetMethod sets the Method optional argument. If set this allows the request method to be overridden. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetPostData ¶
func (a *ContinueInterceptedRequestArgs) SetPostData(postData string) *ContinueInterceptedRequestArgs
SetPostData sets the PostData optional argument. If set this allows postData to be set. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetRawResponse ¶
func (a *ContinueInterceptedRequestArgs) SetRawResponse(rawResponse string) *ContinueInterceptedRequestArgs
SetRawResponse sets the RawResponse optional argument. If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetURL ¶
func (a *ContinueInterceptedRequestArgs) SetURL(url string) *ContinueInterceptedRequestArgs
SetURL sets the URL optional argument. If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge.
type Cookie ¶
type Cookie struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. Domain string `json:"domain"` // Cookie domain. Path string `json:"path"` // Cookie path. Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch. Size int `json:"size"` // Cookie size. HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only. Secure bool `json:"secure"` // True if cookie is secure. Session bool `json:"session"` // True in case of session cookie. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. // Priority Cookie Priority // // Note: This property is experimental. Priority CookiePriority `json:"priority"` }
Cookie Cookie object
type CookieBlockedReason ¶ added in v0.25.0
type CookieBlockedReason string
CookieBlockedReason Types of reasons why a cookie may not be sent with a request.
Note: This type is experimental.
const ( CookieBlockedReasonNotSet CookieBlockedReason = "" CookieBlockedReasonSecureOnly CookieBlockedReason = "SecureOnly" CookieBlockedReasonNotOnPath CookieBlockedReason = "NotOnPath" CookieBlockedReasonDomainMismatch CookieBlockedReason = "DomainMismatch" CookieBlockedReasonSameSiteStrict CookieBlockedReason = "SameSiteStrict" CookieBlockedReasonSameSiteLax CookieBlockedReason = "SameSiteLax" CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax" CookieBlockedReasonSameSiteNoneInsecure CookieBlockedReason = "SameSiteNoneInsecure" CookieBlockedReasonUserPreferences CookieBlockedReason = "UserPreferences" CookieBlockedReasonUnknownError CookieBlockedReason = "UnknownError" )
CookieBlockedReason as enums.
func (CookieBlockedReason) String ¶ added in v0.25.0
func (e CookieBlockedReason) String() string
func (CookieBlockedReason) Valid ¶ added in v0.25.0
func (e CookieBlockedReason) Valid() bool
type CookieParam ¶ added in v0.11.1
type CookieParam struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. URL *string `json:"url,omitempty"` // The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. Domain *string `json:"domain,omitempty"` // Cookie domain. Path *string `json:"path,omitempty"` // Cookie path. Secure *bool `json:"secure,omitempty"` // True if cookie is secure. HTTPOnly *bool `json:"httpOnly,omitempty"` // True if cookie is http-only. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. Expires TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set // Priority Cookie Priority. // // Note: This property is experimental. Priority CookiePriority `json:"priority,omitempty"` }
CookieParam Cookie parameter object
type CookiePriority ¶ added in v0.26.0
type CookiePriority string
CookiePriority Represents the cookie's 'Priority' status: https://tools.ietf.org/html/draft-west-cookie-priority-00
Note: This type is experimental.
const ( CookiePriorityNotSet CookiePriority = "" CookiePriorityLow CookiePriority = "Low" CookiePriorityMedium CookiePriority = "Medium" CookiePriorityHigh CookiePriority = "High" )
CookiePriority as enums.
func (CookiePriority) String ¶ added in v0.26.0
func (e CookiePriority) String() string
func (CookiePriority) Valid ¶ added in v0.26.0
func (e CookiePriority) Valid() bool
type CookieSameSite ¶
type CookieSameSite string
CookieSameSite Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
const ( CookieSameSiteNotSet CookieSameSite = "" CookieSameSiteStrict CookieSameSite = "Strict" CookieSameSiteLax CookieSameSite = "Lax" CookieSameSiteNone CookieSameSite = "None" )
CookieSameSite as enums.
func (CookieSameSite) String ¶
func (e CookieSameSite) String() string
func (CookieSameSite) Valid ¶
func (e CookieSameSite) Valid() bool
type DataReceivedClient ¶
type DataReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*DataReceivedReply, error) rpcc.Stream }
DataReceivedClient is a client for DataReceived events. Fired when data chunk was received over the network.
type DataReceivedReply ¶
type DataReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. DataLength int `json:"dataLength"` // Data chunk length. EncodedDataLength int `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings). }
DataReceivedReply is the reply for DataReceived events.
type DeleteCookiesArgs ¶ added in v0.11.4
type DeleteCookiesArgs struct { Name string `json:"name"` // Name of the cookies to remove. URL *string `json:"url,omitempty"` // If specified, deletes all the cookies with the given name where domain and path match provided URL. Domain *string `json:"domain,omitempty"` // If specified, deletes only cookies with the exact domain. Path *string `json:"path,omitempty"` // If specified, deletes only cookies with the exact path. }
DeleteCookiesArgs represents the arguments for DeleteCookies in the Network domain.
func NewDeleteCookiesArgs ¶ added in v0.11.4
func NewDeleteCookiesArgs(name string) *DeleteCookiesArgs
NewDeleteCookiesArgs initializes DeleteCookiesArgs with the required arguments.
func (*DeleteCookiesArgs) SetDomain ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetDomain(domain string) *DeleteCookiesArgs
SetDomain sets the Domain optional argument. If specified, deletes only cookies with the exact domain.
func (*DeleteCookiesArgs) SetPath ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetPath(path string) *DeleteCookiesArgs
SetPath sets the Path optional argument. If specified, deletes only cookies with the exact path.
func (*DeleteCookiesArgs) SetURL ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetURL(url string) *DeleteCookiesArgs
SetURL sets the URL optional argument. If specified, deletes all the cookies with the given name where domain and path match provided URL.
type EmulateNetworkConditionsArgs ¶
type EmulateNetworkConditionsArgs struct { Offline bool `json:"offline"` // True to emulate internet disconnection. Latency float64 `json:"latency"` // Minimum latency from request sent to response headers received (ms). DownloadThroughput float64 `json:"downloadThroughput"` // Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. UploadThroughput float64 `json:"uploadThroughput"` // Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. ConnectionType ConnectionType `json:"connectionType,omitempty"` // Connection type if known. }
EmulateNetworkConditionsArgs represents the arguments for EmulateNetworkConditions in the Network domain.
func NewEmulateNetworkConditionsArgs ¶
func NewEmulateNetworkConditionsArgs(offline bool, latency float64, downloadThroughput float64, uploadThroughput float64) *EmulateNetworkConditionsArgs
NewEmulateNetworkConditionsArgs initializes EmulateNetworkConditionsArgs with the required arguments.
func (*EmulateNetworkConditionsArgs) SetConnectionType ¶
func (a *EmulateNetworkConditionsArgs) SetConnectionType(connectionType ConnectionType) *EmulateNetworkConditionsArgs
SetConnectionType sets the ConnectionType optional argument. Connection type if known.
type EnableArgs ¶
type EnableArgs struct { // MaxTotalBufferSize Buffer size in bytes to use when preserving // network payloads (XHRs, etc). // // Note: This property is experimental. MaxTotalBufferSize *int `json:"maxTotalBufferSize,omitempty"` // MaxResourceBufferSize Per-resource buffer size in bytes to use when // preserving network payloads (XHRs, etc). // // Note: This property is experimental. MaxResourceBufferSize *int `json:"maxResourceBufferSize,omitempty"` MaxPostDataSize *int `json:"maxPostDataSize,omitempty"` // Longest post body size (in bytes) that would be included in requestWillBeSent notification }
EnableArgs represents the arguments for Enable in the Network domain.
func NewEnableArgs ¶
func NewEnableArgs() *EnableArgs
NewEnableArgs initializes EnableArgs with the required arguments.
func (*EnableArgs) SetMaxPostDataSize ¶ added in v0.15.6
func (a *EnableArgs) SetMaxPostDataSize(maxPostDataSize int) *EnableArgs
SetMaxPostDataSize sets the MaxPostDataSize optional argument. Longest post body size (in bytes) that would be included in requestWillBeSent notification
func (*EnableArgs) SetMaxResourceBufferSize ¶
func (a *EnableArgs) SetMaxResourceBufferSize(maxResourceBufferSize int) *EnableArgs
SetMaxResourceBufferSize sets the MaxResourceBufferSize optional argument. Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
Note: This property is experimental.
func (*EnableArgs) SetMaxTotalBufferSize ¶
func (a *EnableArgs) SetMaxTotalBufferSize(maxTotalBufferSize int) *EnableArgs
SetMaxTotalBufferSize sets the MaxTotalBufferSize optional argument. Buffer size in bytes to use when preserving network payloads (XHRs, etc).
Note: This property is experimental.
type ErrorReason ¶
type ErrorReason string
ErrorReason Network level fetch failure reason.
const ( ErrorReasonNotSet ErrorReason = "" ErrorReasonFailed ErrorReason = "Failed" ErrorReasonAborted ErrorReason = "Aborted" ErrorReasonTimedOut ErrorReason = "TimedOut" ErrorReasonAccessDenied ErrorReason = "AccessDenied" ErrorReasonConnectionClosed ErrorReason = "ConnectionClosed" ErrorReasonConnectionReset ErrorReason = "ConnectionReset" ErrorReasonConnectionRefused ErrorReason = "ConnectionRefused" ErrorReasonConnectionAborted ErrorReason = "ConnectionAborted" ErrorReasonConnectionFailed ErrorReason = "ConnectionFailed" ErrorReasonNameNotResolved ErrorReason = "NameNotResolved" ErrorReasonInternetDisconnected ErrorReason = "InternetDisconnected" ErrorReasonAddressUnreachable ErrorReason = "AddressUnreachable" ErrorReasonBlockedByClient ErrorReason = "BlockedByClient" ErrorReasonBlockedByResponse ErrorReason = "BlockedByResponse" )
ErrorReason as enums.
func (ErrorReason) String ¶
func (e ErrorReason) String() string
func (ErrorReason) Valid ¶
func (e ErrorReason) Valid() bool
type EventSourceMessageReceivedClient ¶
type EventSourceMessageReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*EventSourceMessageReceivedReply, error) rpcc.Stream }
EventSourceMessageReceivedClient is a client for EventSourceMessageReceived events. Fired when EventSource message is received.
type EventSourceMessageReceivedReply ¶
type EventSourceMessageReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. EventName string `json:"eventName"` // Message type. EventID string `json:"eventId"` // Message identifier. Data string `json:"data"` // Message content. }
EventSourceMessageReceivedReply is the reply for EventSourceMessageReceived events.
type GetAllCookiesReply ¶
type GetAllCookiesReply struct {
Cookies []Cookie `json:"cookies"` // Array of cookie objects.
}
GetAllCookiesReply represents the return values for GetAllCookies in the Network domain.
type GetCertificateArgs ¶
type GetCertificateArgs struct {
Origin string `json:"origin"` // Origin to get certificate for.
}
GetCertificateArgs represents the arguments for GetCertificate in the Network domain.
func NewGetCertificateArgs ¶
func NewGetCertificateArgs(origin string) *GetCertificateArgs
NewGetCertificateArgs initializes GetCertificateArgs with the required arguments.
type GetCertificateReply ¶
type GetCertificateReply struct {
TableNames []string `json:"tableNames"` // No description.
}
GetCertificateReply represents the return values for GetCertificate in the Network domain.
type GetCookiesArgs ¶
type GetCookiesArgs struct {
URLs []string `json:"urls,omitempty"` // The list of URLs for which applicable cookies will be fetched
}
GetCookiesArgs represents the arguments for GetCookies in the Network domain.
func NewGetCookiesArgs ¶
func NewGetCookiesArgs() *GetCookiesArgs
NewGetCookiesArgs initializes GetCookiesArgs with the required arguments.
func (*GetCookiesArgs) SetURLs ¶
func (a *GetCookiesArgs) SetURLs(urls []string) *GetCookiesArgs
SetURLs sets the URLs optional argument. The list of URLs for which applicable cookies will be fetched
type GetCookiesReply ¶
type GetCookiesReply struct {
Cookies []Cookie `json:"cookies"` // Array of cookie objects.
}
GetCookiesReply represents the return values for GetCookies in the Network domain.
type GetRequestPostDataArgs ¶ added in v0.15.6
type GetRequestPostDataArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
}
GetRequestPostDataArgs represents the arguments for GetRequestPostData in the Network domain.
func NewGetRequestPostDataArgs ¶ added in v0.15.6
func NewGetRequestPostDataArgs(requestID RequestID) *GetRequestPostDataArgs
NewGetRequestPostDataArgs initializes GetRequestPostDataArgs with the required arguments.
type GetRequestPostDataReply ¶ added in v0.15.6
type GetRequestPostDataReply struct {
PostData string `json:"postData"` // Request body string, omitting files from multipart requests
}
GetRequestPostDataReply represents the return values for GetRequestPostData in the Network domain.
type GetResponseBodyArgs ¶
type GetResponseBodyArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
}
GetResponseBodyArgs represents the arguments for GetResponseBody in the Network domain.
func NewGetResponseBodyArgs ¶
func NewGetResponseBodyArgs(requestID RequestID) *GetResponseBodyArgs
NewGetResponseBodyArgs initializes GetResponseBodyArgs with the required arguments.
type GetResponseBodyForInterceptionArgs ¶ added in v0.14.2
type GetResponseBodyForInterceptionArgs struct {
InterceptionID InterceptionID `json:"interceptionId"` // Identifier for the intercepted request to get body for.
}
GetResponseBodyForInterceptionArgs represents the arguments for GetResponseBodyForInterception in the Network domain.
func NewGetResponseBodyForInterceptionArgs ¶ added in v0.14.2
func NewGetResponseBodyForInterceptionArgs(interceptionID InterceptionID) *GetResponseBodyForInterceptionArgs
NewGetResponseBodyForInterceptionArgs initializes GetResponseBodyForInterceptionArgs with the required arguments.
type GetResponseBodyForInterceptionReply ¶ added in v0.14.2
type GetResponseBodyForInterceptionReply struct { Body string `json:"body"` // Response body. Base64Encoded bool `json:"base64Encoded"` // True, if content was sent as base64. }
GetResponseBodyForInterceptionReply represents the return values for GetResponseBodyForInterception in the Network domain.
type GetResponseBodyReply ¶
type GetResponseBodyReply struct { Body string `json:"body"` // Response body. Base64Encoded bool `json:"base64Encoded"` // True, if content was sent as base64. }
GetResponseBodyReply represents the return values for GetResponseBody in the Network domain.
type Headers ¶
type Headers []byte
Headers Request / response headers as keys / values of JSON object.
func (Headers) MarshalJSON ¶
MarshalJSON copies behavior of json.RawMessage.
func (*Headers) UnmarshalJSON ¶
UnmarshalJSON copies behavior of json.RawMessage.
type Initiator ¶
type Initiator struct { // Type Type of this initiator. // // Values: "parser", "script", "preload", "SignedExchange", "other". Type string `json:"type"` Stack *runtime.StackTrace `json:"stack,omitempty"` // Initiator JavaScript stack trace, set for Script only. URL *string `json:"url,omitempty"` // Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. LineNumber *float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based). }
Initiator Information about the request initiator.
type InterceptionID ¶
type InterceptionID string
InterceptionID Unique intercepted request identifier.
type InterceptionStage ¶ added in v0.14.2
type InterceptionStage string
InterceptionStage Stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received.
Note: This type is experimental.
const ( InterceptionStageNotSet InterceptionStage = "" InterceptionStageRequest InterceptionStage = "Request" InterceptionStageHeadersReceived InterceptionStage = "HeadersReceived" )
InterceptionStage as enums.
func (InterceptionStage) String ¶ added in v0.14.2
func (e InterceptionStage) String() string
func (InterceptionStage) Valid ¶ added in v0.14.2
func (e InterceptionStage) Valid() bool
type LoadingFailedClient ¶
type LoadingFailedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*LoadingFailedReply, error) rpcc.Stream }
LoadingFailedClient is a client for LoadingFailed events. Fired when HTTP request has failed to load.
type LoadingFailedReply ¶
type LoadingFailedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Type ResourceType `json:"type"` // Resource type. ErrorText string `json:"errorText"` // User friendly error message. Canceled *bool `json:"canceled,omitempty"` // True if loading was canceled. BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any. }
LoadingFailedReply is the reply for LoadingFailed events.
type LoadingFinishedClient ¶
type LoadingFinishedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*LoadingFinishedReply, error) rpcc.Stream }
LoadingFinishedClient is a client for LoadingFinished events. Fired when HTTP request has finished loading.
type LoadingFinishedReply ¶
type LoadingFinishedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request. ShouldReportCorbBlocking *bool `json:"shouldReportCorbBlocking,omitempty"` // Set when 1) response was blocked by Cross-Origin Read Blocking and also 2) this needs to be reported to the DevTools console. }
LoadingFinishedReply is the reply for LoadingFinished events.
type MonotonicTime ¶
type MonotonicTime float64
MonotonicTime Monotonically increasing time in seconds since an arbitrary point in the past.
func (MonotonicTime) MarshalJSON ¶
func (t MonotonicTime) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Encodes to null if t is zero.
func (MonotonicTime) String ¶
func (t MonotonicTime) String() string
String calls (time.Time).String().
func (*MonotonicTime) UnmarshalJSON ¶
func (t *MonotonicTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ReplayXHRArgs ¶
type ReplayXHRArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of XHR to replay.
}
ReplayXHRArgs represents the arguments for ReplayXHR in the Network domain.
func NewReplayXHRArgs ¶
func NewReplayXHRArgs(requestID RequestID) *ReplayXHRArgs
NewReplayXHRArgs initializes ReplayXHRArgs with the required arguments.
type Request ¶
type Request struct { URL string `json:"url"` // Request URL (without fragment). URLFragment *string `json:"urlFragment,omitempty"` // Fragment of the requested URL starting with hash, if present. Method string `json:"method"` // HTTP request method. Headers Headers `json:"headers"` // HTTP request headers. PostData *string `json:"postData,omitempty"` // HTTP POST request data. HasPostData *bool `json:"hasPostData,omitempty"` // True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long. MixedContentType *security.MixedContentType `json:"mixedContentType,omitempty"` // The mixed content type of the request. InitialPriority ResourcePriority `json:"initialPriority"` // Priority of the resource request at the time request is sent. // ReferrerPolicy The referrer policy of the request, as defined in // https://www.w3.org/TR/referrer-policy/ // // Values: "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin". ReferrerPolicy string `json:"referrerPolicy"` IsLinkPreload *bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload. }
Request HTTP request data.
type RequestInterceptedClient ¶
type RequestInterceptedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestInterceptedReply, error) rpcc.Stream }
RequestInterceptedClient is a client for RequestIntercepted events. Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
type RequestInterceptedReply ¶
type RequestInterceptedReply struct { InterceptionID InterceptionID `json:"interceptionId"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used. Request Request `json:"request"` // No description. FrameID internal.PageFrameID `json:"frameId"` // The id of the frame that initiated the request. ResourceType ResourceType `json:"resourceType"` // How the requested resource will be used. IsDownload *bool `json:"isDownload,omitempty"` // Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage). RedirectURL *string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted. AuthChallenge *AuthChallenge `json:"authChallenge,omitempty"` // Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse. ResponseErrorReason ErrorReason `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage or if redirect occurred while intercepting request. ResponseStatusCode *int `json:"responseStatusCode,omitempty"` // Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred. ResponseHeaders Headers `json:"responseHeaders,omitempty"` // Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred. RequestID *RequestID `json:"requestId,omitempty"` // If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event. }
RequestInterceptedReply is the reply for RequestIntercepted events.
type RequestPattern ¶ added in v0.14.1
type RequestPattern struct { URLPattern *string `json:"urlPattern,omitempty"` // Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*". ResourceType ResourceType `json:"resourceType,omitempty"` // If set, only requests for matching resource types will be intercepted. InterceptionStage InterceptionStage `json:"interceptionStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request. }
RequestPattern Request pattern for interception.
Note: This type is experimental.
type RequestServedFromCacheClient ¶
type RequestServedFromCacheClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestServedFromCacheReply, error) rpcc.Stream }
RequestServedFromCacheClient is a client for RequestServedFromCache events. Fired if request ended up loading from cache.
type RequestServedFromCacheReply ¶
type RequestServedFromCacheReply struct {
RequestID RequestID `json:"requestId"` // Request identifier.
}
RequestServedFromCacheReply is the reply for RequestServedFromCache events.
type RequestWillBeSentClient ¶
type RequestWillBeSentClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestWillBeSentReply, error) rpcc.Stream }
RequestWillBeSentClient is a client for RequestWillBeSent events. Fired when page is about to send HTTP request.
type RequestWillBeSentExtraInfoClient ¶ added in v0.25.0
type RequestWillBeSentExtraInfoClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestWillBeSentExtraInfoReply, error) rpcc.Stream }
RequestWillBeSentExtraInfoClient is a client for RequestWillBeSentExtraInfo events. Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.
type RequestWillBeSentExtraInfoReply ¶ added in v0.25.0
type RequestWillBeSentExtraInfoReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to an existing requestWillBeSent event. BlockedCookies []BlockedCookieWithReason `json:"blockedCookies"` // A list of cookies which will not be sent with this request along with corresponding reasons for blocking. Headers Headers `json:"headers"` // Raw request headers as they will be sent over the wire. }
RequestWillBeSentExtraInfoReply is the reply for RequestWillBeSentExtraInfo events.
type RequestWillBeSentReply ¶
type RequestWillBeSentReply struct { RequestID RequestID `json:"requestId"` // Request identifier. LoaderID LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker. DocumentURL string `json:"documentURL"` // URL of the document this request is loaded for. Request Request `json:"request"` // Request data. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. WallTime TimeSinceEpoch `json:"wallTime"` // Timestamp. Initiator Initiator `json:"initiator"` // Request initiator. RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data. Type ResourceType `json:"type,omitempty"` // Type of this resource. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame identifier. HasUserGesture *bool `json:"hasUserGesture,omitempty"` // Whether the request is initiated by a user gesture. Defaults to false. }
RequestWillBeSentReply is the reply for RequestWillBeSent events.
type ResourceChangedPriorityClient ¶
type ResourceChangedPriorityClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResourceChangedPriorityReply, error) rpcc.Stream }
ResourceChangedPriorityClient is a client for ResourceChangedPriority events. Fired when resource loading priority is changed
type ResourceChangedPriorityReply ¶
type ResourceChangedPriorityReply struct { RequestID RequestID `json:"requestId"` // Request identifier. NewPriority ResourcePriority `json:"newPriority"` // New priority Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
ResourceChangedPriorityReply is the reply for ResourceChangedPriority events.
type ResourcePriority ¶
type ResourcePriority string
ResourcePriority Loading priority of a resource request.
const ( ResourcePriorityNotSet ResourcePriority = "" ResourcePriorityVeryLow ResourcePriority = "VeryLow" ResourcePriorityLow ResourcePriority = "Low" ResourcePriorityMedium ResourcePriority = "Medium" ResourcePriorityHigh ResourcePriority = "High" ResourcePriorityVeryHigh ResourcePriority = "VeryHigh" )
ResourcePriority as enums.
func (ResourcePriority) String ¶
func (e ResourcePriority) String() string
func (ResourcePriority) Valid ¶
func (e ResourcePriority) Valid() bool
type ResourceTiming ¶
type ResourceTiming struct { RequestTime float64 `json:"requestTime"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. ProxyStart float64 `json:"proxyStart"` // Started resolving proxy. ProxyEnd float64 `json:"proxyEnd"` // Finished resolving proxy. DNSStart float64 `json:"dnsStart"` // Started DNS address resolve. DNSEnd float64 `json:"dnsEnd"` // Finished DNS address resolve. ConnectStart float64 `json:"connectStart"` // Started connecting to the remote host. ConnectEnd float64 `json:"connectEnd"` // Connected to the remote host. SSLStart float64 `json:"sslStart"` // Started SSL handshake. SSLEnd float64 `json:"sslEnd"` // Finished SSL handshake. // WorkerStart Started running ServiceWorker. // // Note: This property is experimental. WorkerStart float64 `json:"workerStart"` // WorkerReady Finished Starting ServiceWorker. // // Note: This property is experimental. WorkerReady float64 `json:"workerReady"` SendStart float64 `json:"sendStart"` // Started sending request. SendEnd float64 `json:"sendEnd"` // Finished sending request. // PushStart Time the server started pushing request. // // Note: This property is experimental. PushStart float64 `json:"pushStart"` // PushEnd Time the server finished pushing request. // // Note: This property is experimental. PushEnd float64 `json:"pushEnd"` ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers. }
ResourceTiming Timing information for the request.
type ResourceType ¶
type ResourceType string
ResourceType Resource type as it was perceived by the rendering engine.
const ( ResourceTypeNotSet ResourceType = "" ResourceTypeDocument ResourceType = "Document" ResourceTypeStylesheet ResourceType = "Stylesheet" ResourceTypeImage ResourceType = "Image" ResourceTypeMedia ResourceType = "Media" ResourceTypeFont ResourceType = "Font" ResourceTypeScript ResourceType = "Script" ResourceTypeTextTrack ResourceType = "TextTrack" ResourceTypeXHR ResourceType = "XHR" ResourceTypeFetch ResourceType = "Fetch" ResourceTypeEventSource ResourceType = "EventSource" ResourceTypeWebSocket ResourceType = "WebSocket" ResourceTypeManifest ResourceType = "Manifest" ResourceTypeSignedExchange ResourceType = "SignedExchange" ResourceTypePing ResourceType = "Ping" ResourceTypeCSPViolationReport ResourceType = "CSPViolationReport" ResourceTypeOther ResourceType = "Other" )
ResourceType as enums.
func (ResourceType) String ¶ added in v0.19.0
func (e ResourceType) String() string
func (ResourceType) Valid ¶ added in v0.19.0
func (e ResourceType) Valid() bool
type Response ¶
type Response struct { URL string `json:"url"` // Response URL. This URL can be different from CachedResource.url in case of redirect. Status int `json:"status"` // HTTP response status code. StatusText string `json:"statusText"` // HTTP response status text. Headers Headers `json:"headers"` // HTTP response headers. HeadersText *string `json:"headersText,omitempty"` // HTTP response headers text. MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser. RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network. RequestHeadersText *string `json:"requestHeadersText,omitempty"` // HTTP request headers text. ConnectionReused bool `json:"connectionReused"` // Specifies whether physical connection was actually reused for this request. ConnectionID float64 `json:"connectionId"` // Physical connection id that was actually used for this request. RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` // Remote IP address. RemotePort *int `json:"remotePort,omitempty"` // Remote port. FromDiskCache *bool `json:"fromDiskCache,omitempty"` // Specifies that the request was served from the disk cache. FromServiceWorker *bool `json:"fromServiceWorker,omitempty"` // Specifies that the request was served from the ServiceWorker. FromPrefetchCache *bool `json:"fromPrefetchCache,omitempty"` // Specifies that the request was served from the prefetch cache. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request so far. Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request. Protocol *string `json:"protocol,omitempty"` // Protocol used to fetch this request. SecurityState security.State `json:"securityState"` // Security state of the request resource. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request. }
Response HTTP response data.
type ResponseReceivedClient ¶
type ResponseReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResponseReceivedReply, error) rpcc.Stream }
ResponseReceivedClient is a client for ResponseReceived events. Fired when HTTP response is available.
type ResponseReceivedExtraInfoClient ¶ added in v0.25.0
type ResponseReceivedExtraInfoClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResponseReceivedExtraInfoReply, error) rpcc.Stream }
ResponseReceivedExtraInfoClient is a client for ResponseReceivedExtraInfo events. 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.
type ResponseReceivedExtraInfoReply ¶ added in v0.25.0
type ResponseReceivedExtraInfoReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another responseReceived event. BlockedCookies []BlockedSetCookieWithReason `json:"blockedCookies"` // 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. Headers Headers `json:"headers"` // Raw response headers as they were received over the wire. HeadersText *string `json:"headersText,omitempty"` // 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. }
ResponseReceivedExtraInfoReply is the reply for ResponseReceivedExtraInfo events.
type ResponseReceivedReply ¶
type ResponseReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. LoaderID LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Type ResourceType `json:"type"` // Resource type. Response Response `json:"response"` // Response data. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame identifier. }
ResponseReceivedReply is the reply for ResponseReceived events.
type SearchInResponseBodyArgs ¶ added in v0.14.2
type SearchInResponseBodyArgs struct { RequestID RequestID `json:"requestId"` // Identifier of the network response to search. Query string `json:"query"` // String to search for. CaseSensitive *bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive. IsRegex *bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex. }
SearchInResponseBodyArgs represents the arguments for SearchInResponseBody in the Network domain.
func NewSearchInResponseBodyArgs ¶ added in v0.14.2
func NewSearchInResponseBodyArgs(requestID RequestID, query string) *SearchInResponseBodyArgs
NewSearchInResponseBodyArgs initializes SearchInResponseBodyArgs with the required arguments.
func (*SearchInResponseBodyArgs) SetCaseSensitive ¶ added in v0.14.2
func (a *SearchInResponseBodyArgs) SetCaseSensitive(caseSensitive bool) *SearchInResponseBodyArgs
SetCaseSensitive sets the CaseSensitive optional argument. If true, search is case sensitive.
func (*SearchInResponseBodyArgs) SetIsRegex ¶ added in v0.14.2
func (a *SearchInResponseBodyArgs) SetIsRegex(isRegex bool) *SearchInResponseBodyArgs
SetIsRegex sets the IsRegex optional argument. If true, treats string parameter as regex.
type SearchInResponseBodyReply ¶ added in v0.14.2
type SearchInResponseBodyReply struct {
Result []debugger.SearchMatch `json:"result"` // List of search matches.
}
SearchInResponseBodyReply represents the return values for SearchInResponseBody in the Network domain.
type SecurityDetails ¶
type SecurityDetails struct { Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC"). KeyExchange string `json:"keyExchange"` // Key Exchange used by the connection, or the empty string if not applicable. KeyExchangeGroup *string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable. Cipher string `json:"cipher"` // Cipher name. MAC *string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs. CertificateID security.CertificateID `json:"certificateId"` // Certificate ID value. SubjectName string `json:"subjectName"` // Certificate subject name. SanList []string `json:"sanList"` // Subject Alternative Name (SAN) DNS names and IP addresses. Issuer string `json:"issuer"` // Name of the issuing CA. ValidFrom TimeSinceEpoch `json:"validFrom"` // Certificate valid from date. ValidTo TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date SignedCertificateTimestampList []SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs). CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"` // Whether the request complied with Certificate Transparency policy }
SecurityDetails Security details about a request.
type SetBlockedURLsArgs ¶
type SetBlockedURLsArgs struct {
URLs []string `json:"urls"` // URL patterns to block. Wildcards ('*') are allowed.
}
SetBlockedURLsArgs represents the arguments for SetBlockedURLs in the Network domain.
func NewSetBlockedURLsArgs ¶
func NewSetBlockedURLsArgs(urls []string) *SetBlockedURLsArgs
NewSetBlockedURLsArgs initializes SetBlockedURLsArgs with the required arguments.
type SetBypassServiceWorkerArgs ¶
type SetBypassServiceWorkerArgs struct {
Bypass bool `json:"bypass"` // Bypass service worker and load from network.
}
SetBypassServiceWorkerArgs represents the arguments for SetBypassServiceWorker in the Network domain.
func NewSetBypassServiceWorkerArgs ¶
func NewSetBypassServiceWorkerArgs(bypass bool) *SetBypassServiceWorkerArgs
NewSetBypassServiceWorkerArgs initializes SetBypassServiceWorkerArgs with the required arguments.
type SetCacheDisabledArgs ¶
type SetCacheDisabledArgs struct {
CacheDisabled bool `json:"cacheDisabled"` // Cache disabled state.
}
SetCacheDisabledArgs represents the arguments for SetCacheDisabled in the Network domain.
func NewSetCacheDisabledArgs ¶
func NewSetCacheDisabledArgs(cacheDisabled bool) *SetCacheDisabledArgs
NewSetCacheDisabledArgs initializes SetCacheDisabledArgs with the required arguments.
type SetCookieArgs ¶
type SetCookieArgs struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. URL *string `json:"url,omitempty"` // The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. Domain *string `json:"domain,omitempty"` // Cookie domain. Path *string `json:"path,omitempty"` // Cookie path. Secure *bool `json:"secure,omitempty"` // True if cookie is secure. HTTPOnly *bool `json:"httpOnly,omitempty"` // True if cookie is http-only. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. Expires TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set // Priority Cookie Priority type. // // Note: This property is experimental. Priority CookiePriority `json:"priority,omitempty"` }
SetCookieArgs represents the arguments for SetCookie in the Network domain.
func NewSetCookieArgs ¶
func NewSetCookieArgs(name string, value string) *SetCookieArgs
NewSetCookieArgs initializes SetCookieArgs with the required arguments.
func (*SetCookieArgs) SetDomain ¶
func (a *SetCookieArgs) SetDomain(domain string) *SetCookieArgs
SetDomain sets the Domain optional argument. Cookie domain.
func (*SetCookieArgs) SetExpires ¶ added in v0.11.1
func (a *SetCookieArgs) SetExpires(expires TimeSinceEpoch) *SetCookieArgs
SetExpires sets the Expires optional argument. Cookie expiration date, session cookie if not set
func (*SetCookieArgs) SetHTTPOnly ¶
func (a *SetCookieArgs) SetHTTPOnly(httpOnly bool) *SetCookieArgs
SetHTTPOnly sets the HTTPOnly optional argument. True if cookie is http-only.
func (*SetCookieArgs) SetPath ¶
func (a *SetCookieArgs) SetPath(path string) *SetCookieArgs
SetPath sets the Path optional argument. Cookie path.
func (*SetCookieArgs) SetPriority ¶ added in v0.26.0
func (a *SetCookieArgs) SetPriority(priority CookiePriority) *SetCookieArgs
SetPriority sets the Priority optional argument. Cookie Priority type.
Note: This property is experimental.
func (*SetCookieArgs) SetSameSite ¶
func (a *SetCookieArgs) SetSameSite(sameSite CookieSameSite) *SetCookieArgs
SetSameSite sets the SameSite optional argument. Cookie SameSite type.
func (*SetCookieArgs) SetSecure ¶
func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs
SetSecure sets the Secure optional argument. True if cookie is secure.
func (*SetCookieArgs) SetURL ¶ added in v0.11.1
func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs
SetURL sets the URL optional argument. The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.
type SetCookieBlockedReason ¶ added in v0.25.0
type SetCookieBlockedReason string
SetCookieBlockedReason Types of reasons why a cookie may not be stored from a response.
Note: This type is experimental.
const ( SetCookieBlockedReasonNotSet SetCookieBlockedReason = "" SetCookieBlockedReasonSecureOnly SetCookieBlockedReason = "SecureOnly" SetCookieBlockedReasonSameSiteStrict SetCookieBlockedReason = "SameSiteStrict" SetCookieBlockedReasonSameSiteLax SetCookieBlockedReason = "SameSiteLax" SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax" SetCookieBlockedReasonSameSiteNoneInsecure SetCookieBlockedReason = "SameSiteNoneInsecure" SetCookieBlockedReasonUserPreferences SetCookieBlockedReason = "UserPreferences" SetCookieBlockedReasonSyntaxError SetCookieBlockedReason = "SyntaxError" SetCookieBlockedReasonSchemeNotSupported SetCookieBlockedReason = "SchemeNotSupported" SetCookieBlockedReasonOverwriteSecure SetCookieBlockedReason = "OverwriteSecure" SetCookieBlockedReasonInvalidDomain SetCookieBlockedReason = "InvalidDomain" SetCookieBlockedReasonInvalidPrefix SetCookieBlockedReason = "InvalidPrefix" SetCookieBlockedReasonUnknownError SetCookieBlockedReason = "UnknownError" )
SetCookieBlockedReason as enums.
func (SetCookieBlockedReason) String ¶ added in v0.25.0
func (e SetCookieBlockedReason) String() string
func (SetCookieBlockedReason) Valid ¶ added in v0.25.0
func (e SetCookieBlockedReason) Valid() bool
type SetCookieReply ¶
type SetCookieReply struct {
Success bool `json:"success"` // True if successfully set cookie.
}
SetCookieReply represents the return values for SetCookie in the Network domain.
type SetCookiesArgs ¶ added in v0.11.1
type SetCookiesArgs struct {
Cookies []CookieParam `json:"cookies"` // Cookies to be set.
}
SetCookiesArgs represents the arguments for SetCookies in the Network domain.
func NewSetCookiesArgs ¶ added in v0.11.1
func NewSetCookiesArgs(cookies []CookieParam) *SetCookiesArgs
NewSetCookiesArgs initializes SetCookiesArgs with the required arguments.
type SetDataSizeLimitsForTestArgs ¶
type SetDataSizeLimitsForTestArgs struct { MaxTotalSize int `json:"maxTotalSize"` // Maximum total buffer size. MaxResourceSize int `json:"maxResourceSize"` // Maximum per-resource size. }
SetDataSizeLimitsForTestArgs represents the arguments for SetDataSizeLimitsForTest in the Network domain.
func NewSetDataSizeLimitsForTestArgs ¶
func NewSetDataSizeLimitsForTestArgs(maxTotalSize int, maxResourceSize int) *SetDataSizeLimitsForTestArgs
NewSetDataSizeLimitsForTestArgs initializes SetDataSizeLimitsForTestArgs with the required arguments.
type SetExtraHTTPHeadersArgs ¶
type SetExtraHTTPHeadersArgs struct {
Headers Headers `json:"headers"` // Map with extra HTTP headers.
}
SetExtraHTTPHeadersArgs represents the arguments for SetExtraHTTPHeaders in the Network domain.
func NewSetExtraHTTPHeadersArgs ¶
func NewSetExtraHTTPHeadersArgs(headers Headers) *SetExtraHTTPHeadersArgs
NewSetExtraHTTPHeadersArgs initializes SetExtraHTTPHeadersArgs with the required arguments.
type SetRequestInterceptionArgs ¶ added in v0.14.1
type SetRequestInterceptionArgs struct {
Patterns []RequestPattern `json:"patterns"` // Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.
}
SetRequestInterceptionArgs represents the arguments for SetRequestInterception in the Network domain.
func NewSetRequestInterceptionArgs ¶ added in v0.14.1
func NewSetRequestInterceptionArgs(patterns []RequestPattern) *SetRequestInterceptionArgs
NewSetRequestInterceptionArgs initializes SetRequestInterceptionArgs with the required arguments.
type SignedCertificateTimestamp ¶
type SignedCertificateTimestamp struct { Status string `json:"status"` // Validation status. Origin string `json:"origin"` // Origin. LogDescription string `json:"logDescription"` // Log name / description. LogID string `json:"logId"` // Log ID. Timestamp TimeSinceEpoch `json:"timestamp"` // Issuance date. HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm. SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm. SignatureData string `json:"signatureData"` // Signature data. }
SignedCertificateTimestamp Details of a signed certificate timestamp (SCT).
type SignedExchangeError ¶ added in v0.18.3
type SignedExchangeError struct { Message string `json:"message"` // Error message. SignatureIndex *int `json:"signatureIndex,omitempty"` // The index of the signature which caused the error. ErrorField SignedExchangeErrorField `json:"errorField,omitempty"` // The field which caused the error. }
SignedExchangeError Information about a signed exchange response.
Note: This type is experimental.
type SignedExchangeErrorField ¶ added in v0.18.3
type SignedExchangeErrorField string
SignedExchangeErrorField Field type for a signed exchange related error.
Note: This type is experimental.
const ( SignedExchangeErrorFieldNotSet SignedExchangeErrorField = "" SignedExchangeErrorFieldSignatureSig SignedExchangeErrorField = "signatureSig" SignedExchangeErrorFieldSignatureIntegrity SignedExchangeErrorField = "signatureIntegrity" SignedExchangeErrorFieldSignatureCertURL SignedExchangeErrorField = "signatureCertUrl" SignedExchangeErrorFieldSignatureCertSha256 SignedExchangeErrorField = "signatureCertSha256" SignedExchangeErrorFieldSignatureValidityURL SignedExchangeErrorField = "signatureValidityUrl" SignedExchangeErrorFieldSignatureTimestamps SignedExchangeErrorField = "signatureTimestamps" )
SignedExchangeErrorField as enums.
func (SignedExchangeErrorField) String ¶ added in v0.18.3
func (e SignedExchangeErrorField) String() string
func (SignedExchangeErrorField) Valid ¶ added in v0.18.3
func (e SignedExchangeErrorField) Valid() bool
type SignedExchangeHeader ¶ added in v0.18.2
type SignedExchangeHeader struct { RequestURL string `json:"requestUrl"` // Signed exchange request URL. ResponseCode int `json:"responseCode"` // Signed exchange response code. ResponseHeaders Headers `json:"responseHeaders"` // Signed exchange response headers. Signatures []SignedExchangeSignature `json:"signatures"` // Signed exchange response signature. HeaderIntegrity string `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>". }
SignedExchangeHeader Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
Note: This type is experimental.
type SignedExchangeInfo ¶ added in v0.18.2
type SignedExchangeInfo struct { OuterResponse Response `json:"outerResponse"` // The outer response of signed HTTP exchange which was received from network. Header *SignedExchangeHeader `json:"header,omitempty"` // Information about the signed exchange header. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the signed exchange header. Errors []SignedExchangeError `json:"errors,omitempty"` // Errors occurred while handling the signed exchagne. }
SignedExchangeInfo Information about a signed exchange response.
Note: This type is experimental.
type SignedExchangeReceivedClient ¶ added in v0.18.2
type SignedExchangeReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*SignedExchangeReceivedReply, error) rpcc.Stream }
SignedExchangeReceivedClient is a client for SignedExchangeReceived events. Fired when a signed exchange was received over the network
type SignedExchangeReceivedReply ¶ added in v0.18.2
type SignedExchangeReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Info SignedExchangeInfo `json:"info"` // Information about the signed exchange response. }
SignedExchangeReceivedReply is the reply for SignedExchangeReceived events.
type SignedExchangeSignature ¶ added in v0.18.2
type SignedExchangeSignature struct { Label string `json:"label"` // Signed exchange signature label. Signature string `json:"signature"` // The hex string of signed exchange signature. Integrity string `json:"integrity"` // Signed exchange signature integrity. CertURL *string `json:"certUrl,omitempty"` // Signed exchange signature cert Url. CertSha256 *string `json:"certSha256,omitempty"` // The hex string of signed exchange signature cert sha256. ValidityURL string `json:"validityUrl"` // Signed exchange signature validity Url. Date int `json:"date"` // Signed exchange signature date. Expires int `json:"expires"` // Signed exchange signature expires. Certificates []string `json:"certificates,omitempty"` // The encoded certificates. }
SignedExchangeSignature Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
Note: This type is experimental.
type TakeResponseBodyForInterceptionAsStreamArgs ¶ added in v0.18.1
type TakeResponseBodyForInterceptionAsStreamArgs struct {
InterceptionID InterceptionID `json:"interceptionId"` // No description.
}
TakeResponseBodyForInterceptionAsStreamArgs represents the arguments for TakeResponseBodyForInterceptionAsStream in the Network domain.
func NewTakeResponseBodyForInterceptionAsStreamArgs ¶ added in v0.18.1
func NewTakeResponseBodyForInterceptionAsStreamArgs(interceptionID InterceptionID) *TakeResponseBodyForInterceptionAsStreamArgs
NewTakeResponseBodyForInterceptionAsStreamArgs initializes TakeResponseBodyForInterceptionAsStreamArgs with the required arguments.
type TakeResponseBodyForInterceptionAsStreamReply ¶ added in v0.18.1
type TakeResponseBodyForInterceptionAsStreamReply struct {
Stream io.StreamHandle `json:"stream"` // No description.
}
TakeResponseBodyForInterceptionAsStreamReply represents the return values for TakeResponseBodyForInterceptionAsStream in the Network domain.
type TimeSinceEpoch ¶
type TimeSinceEpoch = internal.NetworkTimeSinceEpoch
TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
type WebSocketClosedClient ¶
type WebSocketClosedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketClosedReply, error) rpcc.Stream }
WebSocketClosedClient is a client for WebSocketClosed events. Fired when WebSocket is closed.
type WebSocketClosedReply ¶
type WebSocketClosedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
WebSocketClosedReply is the reply for WebSocketClosed events.
type WebSocketCreatedClient ¶
type WebSocketCreatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketCreatedReply, error) rpcc.Stream }
WebSocketCreatedClient is a client for WebSocketCreated events. Fired upon WebSocket creation.
type WebSocketCreatedReply ¶
type WebSocketCreatedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. URL string `json:"url"` // WebSocket request URL. Initiator *Initiator `json:"initiator,omitempty"` // Request initiator. }
WebSocketCreatedReply is the reply for WebSocketCreated events.
type WebSocketFrame ¶
type WebSocketFrame struct { Opcode float64 `json:"opcode"` // WebSocket message opcode. Mask bool `json:"mask"` // WebSocket message mask. PayloadData string `json:"payloadData"` // WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data. }
WebSocketFrame WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
type WebSocketFrameErrorClient ¶
type WebSocketFrameErrorClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameErrorReply, error) rpcc.Stream }
WebSocketFrameErrorClient is a client for WebSocketFrameError events. Fired when WebSocket message error occurs.
type WebSocketFrameErrorReply ¶
type WebSocketFrameErrorReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. ErrorMessage string `json:"errorMessage"` // WebSocket error message. }
WebSocketFrameErrorReply is the reply for WebSocketFrameError events.
type WebSocketFrameReceivedClient ¶
type WebSocketFrameReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameReceivedReply, error) rpcc.Stream }
WebSocketFrameReceivedClient is a client for WebSocketFrameReceived events. Fired when WebSocket message is received.
type WebSocketFrameReceivedReply ¶
type WebSocketFrameReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketFrame `json:"response"` // WebSocket response data. }
WebSocketFrameReceivedReply is the reply for WebSocketFrameReceived events.
type WebSocketFrameSentClient ¶
type WebSocketFrameSentClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameSentReply, error) rpcc.Stream }
WebSocketFrameSentClient is a client for WebSocketFrameSent events. Fired when WebSocket message is sent.
type WebSocketFrameSentReply ¶
type WebSocketFrameSentReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketFrame `json:"response"` // WebSocket response data. }
WebSocketFrameSentReply is the reply for WebSocketFrameSent events.
type WebSocketHandshakeResponseReceivedClient ¶
type WebSocketHandshakeResponseReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketHandshakeResponseReceivedReply, error) rpcc.Stream }
WebSocketHandshakeResponseReceivedClient is a client for WebSocketHandshakeResponseReceived events. Fired when WebSocket handshake response becomes available.
type WebSocketHandshakeResponseReceivedReply ¶
type WebSocketHandshakeResponseReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketResponse `json:"response"` // WebSocket response data. }
WebSocketHandshakeResponseReceivedReply is the reply for WebSocketHandshakeResponseReceived events.
type WebSocketRequest ¶
type WebSocketRequest struct {
Headers Headers `json:"headers"` // HTTP request headers.
}
WebSocketRequest WebSocket request data.
type WebSocketResponse ¶
type WebSocketResponse struct { Status int `json:"status"` // HTTP response status code. StatusText string `json:"statusText"` // HTTP response status text. Headers Headers `json:"headers"` // HTTP response headers. HeadersText *string `json:"headersText,omitempty"` // HTTP response headers text. RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers. RequestHeadersText *string `json:"requestHeadersText,omitempty"` // HTTP request headers text. }
WebSocketResponse WebSocket response data.
type WebSocketWillSendHandshakeRequestClient ¶
type WebSocketWillSendHandshakeRequestClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketWillSendHandshakeRequestReply, error) rpcc.Stream }
WebSocketWillSendHandshakeRequestClient is a client for WebSocketWillSendHandshakeRequest events. Fired when WebSocket is about to initiate handshake.
type WebSocketWillSendHandshakeRequestReply ¶
type WebSocketWillSendHandshakeRequestReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. WallTime TimeSinceEpoch `json:"wallTime"` // UTC Timestamp. Request WebSocketRequest `json:"request"` // WebSocket request data. }
WebSocketWillSendHandshakeRequestReply is the reply for WebSocketWillSendHandshakeRequest events.