network

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CanClearBrowserCache = "Network.canClearBrowserCache"

Tells whether clearing browser cache is supported.

View Source
const CanClearBrowserCookies = "Network.canClearBrowserCookies"

Tells whether clearing browser cookies is supported.

View Source
const CanEmulateNetworkConditions = "Network.canEmulateNetworkConditions"

Tells whether emulation of network conditions is supported.

View Source
const ClearBrowserCache = "Network.clearBrowserCache"

Clears browser cache.

View Source
const ClearBrowserCookies = "Network.clearBrowserCookies"

Clears browser cookies.

View Source
const ContinueInterceptedRequest = "Network.continueInterceptedRequest"

Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.

View Source
const DataReceivedEvent = "Network.dataReceived"

Fired when data chunk was received over the network.

View Source
const DeleteCookies = "Network.deleteCookies"

Deletes browser cookies with matching name and url or domain/path pair.

View Source
const Disable = "Network.disable"

Disables network tracking, prevents network events from being sent to the client.

View Source
const EmulateNetworkConditions = "Network.emulateNetworkConditions"

Activates emulation of network conditions.

View Source
const Enable = "Network.enable"

Enables network tracking, network events will now be delivered to the client.

View Source
const EventSourceMessageReceivedEvent = "Network.eventSourceMessageReceived"

Fired when EventSource message is received.

View Source
const GetAllCookies = "Network.getAllCookies"

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field.

View Source
const GetCertificate = "Network.getCertificate"

Returns the DER-encoded certificate.

View Source
const GetCookies = "Network.getCookies"

Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field.

View Source
const GetRequestPostData = "Network.getRequestPostData"

Returns post data sent with the request. Returns an error when no data was sent with the request.

View Source
const GetResponseBody = "Network.getResponseBody"

Returns content served for the given request.

View Source
const GetResponseBodyForInterception = "Network.getResponseBodyForInterception"

Returns content served for the given currently intercepted request.

View Source
const LoadingFailedEvent = "Network.loadingFailed"

Fired when HTTP request has failed to load.

View Source
const LoadingFinishedEvent = "Network.loadingFinished"

Fired when HTTP request has finished loading.

View Source
const ReplayXHR = "Network.replayXHR"

This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.

View Source
const RequestInterceptedEvent = "Network.requestIntercepted"

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.

View Source
const RequestServedFromCacheEvent = "Network.requestServedFromCache"

Fired if request ended up loading from cache.

View Source
const RequestWillBeSentEvent = "Network.requestWillBeSent"

Fired when page is about to send HTTP request.

View Source
const RequestWillBeSentExtraInfoEvent = "Network.requestWillBeSentExtraInfo"

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.

View Source
const ResourceChangedPriorityEvent = "Network.resourceChangedPriority"

Fired when resource loading priority is changed

View Source
const ResponseReceivedEvent = "Network.responseReceived"

Fired when HTTP response is available.

View Source
const ResponseReceivedExtraInfoEvent = "Network.responseReceivedExtraInfo"

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.

View Source
const SearchInResponseBody = "Network.searchInResponseBody"

Searches for given string in response content.

View Source
const SetBlockedURLs = "Network.setBlockedURLs"

Blocks URLs from loading.

View Source
const SetBypassServiceWorker = "Network.setBypassServiceWorker"

Toggles ignoring of service worker for each request.

View Source
const SetCacheDisabled = "Network.setCacheDisabled"

Toggles ignoring cache for each request. If `true`, cache will not be used.

View Source
const SetCookie = "Network.setCookie"

Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.

View Source
const SetCookies = "Network.setCookies"

Sets given cookies.

View Source
const SetDataSizeLimitsForTest = "Network.setDataSizeLimitsForTest"

For testing.

View Source
const SetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"

Specifies whether to always send extra HTTP headers with the requests from this page.

View Source
const SetRequestInterception = "Network.setRequestInterception"

Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead.

View Source
const SetUserAgentOverride = "Network.setUserAgentOverride"

Allows overriding user agent with the given string.

View Source
const SignedExchangeReceivedEvent = "Network.signedExchangeReceived"

Fired when a signed exchange was received over the network

View Source
const TakeResponseBodyForInterceptionAsStream = "Network.takeResponseBodyForInterceptionAsStream"

Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.

View Source
const WebSocketClosedEvent = "Network.webSocketClosed"

Fired when WebSocket is closed.

View Source
const WebSocketCreatedEvent = "Network.webSocketCreated"

Fired upon WebSocket creation.

View Source
const WebSocketFrameErrorEvent = "Network.webSocketFrameError"

Fired when WebSocket message error occurs.

View Source
const WebSocketFrameReceivedEvent = "Network.webSocketFrameReceived"

Fired when WebSocket message is received.

View Source
const WebSocketFrameSentEvent = "Network.webSocketFrameSent"

Fired when WebSocket message is sent.

View Source
const WebSocketHandshakeResponseReceivedEvent = "Network.webSocketHandshakeResponseReceived"

Fired when WebSocket handshake response becomes available.

View Source
const WebSocketWillSendHandshakeRequestEvent = "Network.webSocketWillSendHandshakeRequest"

Fired when WebSocket is about to initiate handshake.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthChallenge

type AuthChallenge struct {

	// Source of the authentication challenge.
	Source string `json:"source,omitempty"`

	// Origin of the challenger.
	Origin string `json:"origin"`

	// The authentication scheme used, such as basic or digest
	Scheme string `json:"scheme"`

	// The realm of the challenge. May be empty.
	Realm string `json:"realm"`
}

Authorization challenge for HTTP status code 401 or 407.

type AuthChallengeResponse

type AuthChallengeResponse struct {

	// 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.
	Response string `json:"response"`

	// The username to provide, possibly empty. Should only be set if response is
	// ProvideCredentials.
	Username string `json:"username,omitempty"`

	// The password to provide, possibly empty. Should only be set if response is
	// ProvideCredentials.
	Password string `json:"password,omitempty"`
}

Response to an AuthChallenge.

type BlockedCookieWithReason

type BlockedCookieWithReason struct {

	// The reason(s) the cookie was blocked.
	BlockedReasons []*CookieBlockedReason `json:"blockedReasons"`

	// The cookie object representing the cookie which was not sent.
	Cookie Cookie `json:"cookie"`
}

A cookie with was not sent with a request with the corresponding reason.

type BlockedReason

type BlockedReason string

The reason why request was blocked.

type BlockedSetCookieWithReason

type BlockedSetCookieWithReason struct {

	// The reason(s) this cookie was blocked.
	BlockedReasons []*SetCookieBlockedReason `json:"blockedReasons"`

	// 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.
	CookieLine string `json:"cookieLine"`

	// 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.
	Cookie Cookie `json:"cookie,omitempty"`
}

A cookie which was not stored from a response with the corresponding reason.

type CachedResource

type CachedResource struct {

	// Resource URL. This is the url of the original network request.
	Url string `json:"url"`

	// Type of this resource.
	Type ResourceType `json:"type"`

	// Cached response data.
	Response Response `json:"response,omitempty"`

	// Cached response body size.
	BodySize float64 `json:"bodySize"`
}

Information about the cached resource.

type CanClearBrowserCacheParams

type CanClearBrowserCacheParams struct {
}

type CanClearBrowserCacheResult

type CanClearBrowserCacheResult struct {

	// True if browser cache can be cleared.
	Result bool `json:"result"`
}

type CanClearBrowserCookiesParams

type CanClearBrowserCookiesParams struct {
}

type CanClearBrowserCookiesResult

type CanClearBrowserCookiesResult struct {

	// True if browser cookies can be cleared.
	Result bool `json:"result"`
}

type CanEmulateNetworkConditionsParams

type CanEmulateNetworkConditionsParams struct {
}

type CanEmulateNetworkConditionsResult

type CanEmulateNetworkConditionsResult struct {

	// True if emulation of network conditions is supported.
	Result bool `json:"result"`
}

type CertificateTransparencyCompliance

type CertificateTransparencyCompliance string

Whether the request complied with Certificate Transparency policy.

type ClearBrowserCacheParams

type ClearBrowserCacheParams struct {
}

type ClearBrowserCacheResult

type ClearBrowserCacheResult struct {
}

type ClearBrowserCookiesParams

type ClearBrowserCookiesParams struct {
}

type ClearBrowserCookiesResult

type ClearBrowserCookiesResult struct {
}

type ConnectionType

type ConnectionType string

The underlying connection technology that the browser is supposedly using.

type ContinueInterceptedRequestParams

type ContinueInterceptedRequestParams struct {

	//
	InterceptionId InterceptionId `json:"interceptionId"`

	// 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.
	ErrorReason ErrorReason `json:"errorReason,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.
	RawResponse []byte `json:"rawResponse,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.
	Url string `json:"url,omitempty"`

	// If set this allows the request method to be overridden. Must not be set in response to an
	// authChallenge.
	Method string `json:"method,omitempty"`

	// If set this allows postData to be set. Must not be set in response to an authChallenge.
	PostData string `json:"postData,omitempty"`

	// If set this allows the request headers to be changed. Must not be set in response to an
	// authChallenge.
	Headers Headers `json:"headers,omitempty"`

	// Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
	AuthChallengeResponse AuthChallengeResponse `json:"authChallengeResponse,omitempty"`
}

type ContinueInterceptedRequestResult

type ContinueInterceptedRequestResult struct {
}
type Cookie struct {

	// Cookie name.
	Name string `json:"name"`

	// Cookie value.
	Value string `json:"value"`

	// Cookie domain.
	Domain string `json:"domain"`

	// Cookie path.
	Path string `json:"path"`

	// Cookie expiration date as the number of seconds since the UNIX epoch.
	Expires float64 `json:"expires"`

	// Cookie size.
	Size int `json:"size"`

	// True if cookie is http-only.
	HttpOnly bool `json:"httpOnly"`

	// True if cookie is secure.
	Secure bool `json:"secure"`

	// True in case of session cookie.
	Session bool `json:"session"`

	// Cookie SameSite type.
	SameSite CookieSameSite `json:"sameSite,omitempty"`
}

Cookie object

type CookieBlockedReason

type CookieBlockedReason string

Types of reasons why a cookie may not be sent with a request.

type CookieParam

type CookieParam struct {

	// Cookie name.
	Name string `json:"name"`

	// Cookie value.
	Value string `json:"value"`

	// 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.
	Url string `json:"url,omitempty"`

	// Cookie domain.
	Domain string `json:"domain,omitempty"`

	// Cookie path.
	Path string `json:"path,omitempty"`

	// True if cookie is secure.
	Secure bool `json:"secure,omitempty"`

	// True if cookie is http-only.
	HttpOnly bool `json:"httpOnly,omitempty"`

	// Cookie SameSite type.
	SameSite CookieSameSite `json:"sameSite,omitempty"`

	// Cookie expiration date, session cookie if not set
	Expires TimeSinceEpoch `json:"expires,omitempty"`
}

Cookie parameter object

type CookieSameSite

type CookieSameSite string

Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies

type DataReceivedParams

type DataReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// Data chunk length.
	DataLength int
	// Actual bytes received (might be less than dataLength for compressed encodings).
	EncodedDataLength int
}

type DeleteCookiesParams

type DeleteCookiesParams struct {

	// Name of the cookies to remove.
	Name string `json:"name"`

	// If specified, deletes all the cookies with the given name where domain and path match
	// provided URL.
	Url string `json:"url,omitempty"`

	// If specified, deletes only cookies with the exact domain.
	Domain string `json:"domain,omitempty"`

	// If specified, deletes only cookies with the exact path.
	Path string `json:"path,omitempty"`
}

type DeleteCookiesResult

type DeleteCookiesResult struct {
}

type DisableParams

type DisableParams struct {
}

type DisableResult

type DisableResult struct {
}

type EmulateNetworkConditionsParams

type EmulateNetworkConditionsParams struct {

	// True to emulate internet disconnection.
	Offline bool `json:"offline"`

	// Minimum latency from request sent to response headers received (ms).
	Latency float64 `json:"latency"`

	// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
	DownloadThroughput float64 `json:"downloadThroughput"`

	// Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
	UploadThroughput float64 `json:"uploadThroughput"`

	// Connection type if known.
	ConnectionType ConnectionType `json:"connectionType,omitempty"`
}

type EmulateNetworkConditionsResult

type EmulateNetworkConditionsResult struct {
}

type EnableParams

type EnableParams struct {

	// Buffer size in bytes to use when preserving network payloads (XHRs, etc).
	MaxTotalBufferSize int `json:"maxTotalBufferSize,omitempty"`

	// Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
	MaxResourceBufferSize int `json:"maxResourceBufferSize,omitempty"`

	// Longest post body size (in bytes) that would be included in requestWillBeSent notification
	MaxPostDataSize int `json:"maxPostDataSize,omitempty"`
}

type EnableResult

type EnableResult struct {
}

type ErrorReason

type ErrorReason string

Network level fetch failure reason.

type EventSourceMessageReceivedParams

type EventSourceMessageReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// Message type.
	EventName string
	// Message identifier.
	EventId string
	// Message content.
	Data string
}

type GetAllCookiesParams

type GetAllCookiesParams struct {
}

type GetAllCookiesResult

type GetAllCookiesResult struct {

	// Array of cookie objects.
	Cookies []*Cookie `json:"cookies"`
}

type GetCertificateParams

type GetCertificateParams struct {

	// Origin to get certificate for.
	Origin string `json:"origin"`
}

type GetCertificateResult

type GetCertificateResult struct {

	//
	TableNames []string `json:"tableNames"`
}

type GetCookiesParams

type GetCookiesParams struct {

	// The list of URLs for which applicable cookies will be fetched
	Urls []string `json:"urls,omitempty"`
}

type GetCookiesResult

type GetCookiesResult struct {

	// Array of cookie objects.
	Cookies []*Cookie `json:"cookies"`
}

type GetRequestPostDataParams

type GetRequestPostDataParams struct {

	// Identifier of the network request to get content for.
	RequestId RequestId `json:"requestId"`
}

type GetRequestPostDataResult

type GetRequestPostDataResult struct {

	// Request body string, omitting files from multipart requests
	PostData string `json:"postData"`
}

type GetResponseBodyForInterceptionParams

type GetResponseBodyForInterceptionParams struct {

	// Identifier for the intercepted request to get body for.
	InterceptionId InterceptionId `json:"interceptionId"`
}

type GetResponseBodyForInterceptionResult

type GetResponseBodyForInterceptionResult struct {

	// Response body.
	Body string `json:"body"`
	// True, if content was sent as base64.
	Base64Encoded bool `json:"base64Encoded"`
}

type GetResponseBodyParams

type GetResponseBodyParams struct {

	// Identifier of the network request to get content for.
	RequestId RequestId `json:"requestId"`
}

type GetResponseBodyResult

type GetResponseBodyResult struct {

	// Response body.
	Body string `json:"body"`
	// True, if content was sent as base64.
	Base64Encoded bool `json:"base64Encoded"`
}

type Headers

type Headers interface{}

Request / response headers as keys / values of JSON object.

type Initiator

type Initiator struct {

	// Type of this initiator.
	Type string `json:"type"`

	// Initiator JavaScript stack trace, set for Script only.
	Stack runtime.StackTrace `json:"stack,omitempty"`

	// Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
	Url string `json:"url,omitempty"`

	// Initiator line number, set for Parser type or for Script type (when script is importing
	// module) (0-based).
	LineNumber float64 `json:"lineNumber,omitempty"`
}

Information about the request initiator.

type InterceptionId

type InterceptionId string

Unique intercepted request identifier.

type InterceptionStage

type InterceptionStage string

Stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received.

type LoaderId

type LoaderId string

Unique loader identifier.

type LoadingFailedParams

type LoadingFailedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// Resource type.
	Type ResourceType
	// User friendly error message.
	ErrorText string
	// True if loading was canceled.
	Canceled bool
	// The reason why loading was blocked, if any.
	BlockedReason BlockedReason
}

type LoadingFinishedParams

type LoadingFinishedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// Total number of bytes received for this request.
	EncodedDataLength float64
	// Set when 1) response was blocked by Cross-Origin Read Blocking and also
	// 2) this needs to be reported to the DevTools console.
	ShouldReportCorbBlocking bool
}

type MonotonicTime

type MonotonicTime float64

Monotonically increasing time in seconds since an arbitrary point in the past.

type ReplayXHRParams

type ReplayXHRParams struct {

	// Identifier of XHR to replay.
	RequestId RequestId `json:"requestId"`
}

type ReplayXHRResult

type ReplayXHRResult struct {
}

type Request

type Request struct {

	// Request URL (without fragment).
	Url string `json:"url"`

	// Fragment of the requested URL starting with hash, if present.
	UrlFragment string `json:"urlFragment,omitempty"`

	// HTTP request method.
	Method string `json:"method"`

	// HTTP request headers.
	Headers Headers `json:"headers"`

	// HTTP POST request data.
	PostData string `json:"postData,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.
	HasPostData bool `json:"hasPostData,omitempty"`

	// The mixed content type of the request.
	MixedContentType security.MixedContentType `json:"mixedContentType,omitempty"`

	// Priority of the resource request at the time request is sent.
	InitialPriority ResourcePriority `json:"initialPriority"`

	// The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
	ReferrerPolicy string `json:"referrerPolicy"`

	// Whether is loaded via link preload.
	IsLinkPreload bool `json:"isLinkPreload,omitempty"`
}

HTTP request data.

type RequestId

type RequestId string

Unique request identifier.

type RequestInterceptedParams

type RequestInterceptedParams struct {

	// 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.
	InterceptionId InterceptionId
	//
	Request Request
	// The id of the frame that initiated the request.
	FrameId cdp.FrameId
	// How the requested resource will be used.
	ResourceType ResourceType
	// Whether this is a navigation request, which can abort the navigation completely.
	IsNavigationRequest bool
	// 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).
	IsDownload bool
	// Redirect location, only sent if a redirect was intercepted.
	RedirectUrl string
	// Details of the Authorization Challenge encountered. If this is set then
	// continueInterceptedRequest must contain an authChallengeResponse.
	AuthChallenge AuthChallenge
	// Response error if intercepted at response stage or if redirect occurred while intercepting
	// request.
	ResponseErrorReason ErrorReason
	// Response code if intercepted at response stage or if redirect occurred while intercepting
	// request or auth retry occurred.
	ResponseStatusCode int
	// Response headers if intercepted at the response stage or if redirect occurred while
	// intercepting request or auth retry occurred.
	ResponseHeaders Headers
	// 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.
	RequestId RequestId
}

type RequestPattern

type RequestPattern struct {

	// Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is
	// backslash. Omitting is equivalent to "*".
	UrlPattern string `json:"urlPattern,omitempty"`

	// If set, only requests for matching resource types will be intercepted.
	ResourceType ResourceType `json:"resourceType,omitempty"`

	// Stage at wich to begin intercepting requests. Default is Request.
	InterceptionStage InterceptionStage `json:"interceptionStage,omitempty"`
}

Request pattern for interception.

type RequestServedFromCacheParams

type RequestServedFromCacheParams struct {

	// Request identifier.
	RequestId RequestId
}

type RequestWillBeSentExtraInfoParams

type RequestWillBeSentExtraInfoParams struct {

	// Request identifier. Used to match this information to an existing requestWillBeSent event.
	RequestId RequestId
	// A list of cookies which will not be sent with this request along with corresponding reasons
	// for blocking.
	BlockedCookies []*BlockedCookieWithReason
	// Raw request headers as they will be sent over the wire.
	Headers Headers
}

type RequestWillBeSentParams

type RequestWillBeSentParams struct {

	// Request identifier.
	RequestId RequestId
	// Loader identifier. Empty string if the request is fetched from worker.
	LoaderId LoaderId
	// URL of the document this request is loaded for.
	DocumentURL string
	// Request data.
	Request Request
	// Timestamp.
	Timestamp MonotonicTime
	// Timestamp.
	WallTime TimeSinceEpoch
	// Request initiator.
	Initiator Initiator
	// Redirect response data.
	RedirectResponse Response
	// Type of this resource.
	Type ResourceType
	// Frame identifier.
	FrameId cdp.FrameId
	// Whether the request is initiated by a user gesture. Defaults to false.
	HasUserGesture bool
}

type ResourceChangedPriorityParams

type ResourceChangedPriorityParams struct {

	// Request identifier.
	RequestId RequestId
	// New priority
	NewPriority ResourcePriority
	// Timestamp.
	Timestamp MonotonicTime
}

type ResourcePriority

type ResourcePriority string

Loading priority of a resource request.

type ResourceTiming

type ResourceTiming struct {

	// Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
	// milliseconds relatively to this requestTime.
	RequestTime float64 `json:"requestTime"`

	// Started resolving proxy.
	ProxyStart float64 `json:"proxyStart"`

	// Finished resolving proxy.
	ProxyEnd float64 `json:"proxyEnd"`

	// Started DNS address resolve.
	DnsStart float64 `json:"dnsStart"`

	// Finished DNS address resolve.
	DnsEnd float64 `json:"dnsEnd"`

	// Started connecting to the remote host.
	ConnectStart float64 `json:"connectStart"`

	// Connected to the remote host.
	ConnectEnd float64 `json:"connectEnd"`

	// Started SSL handshake.
	SslStart float64 `json:"sslStart"`

	// Finished SSL handshake.
	SslEnd float64 `json:"sslEnd"`

	// Started running ServiceWorker.
	WorkerStart float64 `json:"workerStart"`

	// Finished Starting ServiceWorker.
	WorkerReady float64 `json:"workerReady"`

	// Started sending request.
	SendStart float64 `json:"sendStart"`

	// Finished sending request.
	SendEnd float64 `json:"sendEnd"`

	// Time the server started pushing request.
	PushStart float64 `json:"pushStart"`

	// Time the server finished pushing request.
	PushEnd float64 `json:"pushEnd"`

	// Finished receiving response headers.
	ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"`
}

Timing information for the request.

type ResourceType

type ResourceType string

Resource type as it was perceived by the rendering engine.

type Response

type Response struct {

	// Response URL. This URL can be different from CachedResource.url in case of redirect.
	Url string `json:"url"`

	// HTTP response status code.
	Status int `json:"status"`

	// HTTP response status text.
	StatusText string `json:"statusText"`

	// HTTP response headers.
	Headers Headers `json:"headers"`

	// HTTP response headers text.
	HeadersText string `json:"headersText,omitempty"`

	// Resource mimeType as determined by the browser.
	MimeType string `json:"mimeType"`

	// Refined HTTP request headers that were actually transmitted over the network.
	RequestHeaders Headers `json:"requestHeaders,omitempty"`

	// HTTP request headers text.
	RequestHeadersText string `json:"requestHeadersText,omitempty"`

	// Specifies whether physical connection was actually reused for this request.
	ConnectionReused bool `json:"connectionReused"`

	// Physical connection id that was actually used for this request.
	ConnectionId float64 `json:"connectionId"`

	// Remote IP address.
	RemoteIPAddress string `json:"remoteIPAddress,omitempty"`

	// Remote port.
	RemotePort int `json:"remotePort,omitempty"`

	// Specifies that the request was served from the disk cache.
	FromDiskCache bool `json:"fromDiskCache,omitempty"`

	// Specifies that the request was served from the ServiceWorker.
	FromServiceWorker bool `json:"fromServiceWorker,omitempty"`

	// Specifies that the request was served from the prefetch cache.
	FromPrefetchCache bool `json:"fromPrefetchCache,omitempty"`

	// Total number of bytes received for this request so far.
	EncodedDataLength float64 `json:"encodedDataLength"`

	// Timing information for the given request.
	Timing ResourceTiming `json:"timing,omitempty"`

	// Protocol used to fetch this request.
	Protocol string `json:"protocol,omitempty"`

	// Security state of the request resource.
	SecurityState security.SecurityState `json:"securityState"`

	// Security details for the request.
	SecurityDetails SecurityDetails `json:"securityDetails,omitempty"`
}

HTTP response data.

type ResponseReceivedExtraInfoParams

type ResponseReceivedExtraInfoParams struct {

	// Request identifier. Used to match this information to another responseReceived event.
	RequestId RequestId
	// 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.
	BlockedCookies []*BlockedSetCookieWithReason
	// Raw response headers as they were received over the wire.
	Headers Headers
	// 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.
	HeadersText string
}

type ResponseReceivedParams

type ResponseReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Loader identifier. Empty string if the request is fetched from worker.
	LoaderId LoaderId
	// Timestamp.
	Timestamp MonotonicTime
	// Resource type.
	Type ResourceType
	// Response data.
	Response Response
	// Frame identifier.
	FrameId cdp.FrameId
}

type SearchInResponseBodyParams

type SearchInResponseBodyParams struct {

	// Identifier of the network response to search.
	RequestId RequestId `json:"requestId"`

	// String to search for.
	Query string `json:"query"`

	// If true, search is case sensitive.
	CaseSensitive bool `json:"caseSensitive,omitempty"`

	// If true, treats string parameter as regex.
	IsRegex bool `json:"isRegex,omitempty"`
}

type SearchInResponseBodyResult

type SearchInResponseBodyResult struct {

	// List of search matches.
	Result []*debugger.SearchMatch `json:"result"`
}

type SecurityDetails

type SecurityDetails struct {

	// Protocol name (e.g. "TLS 1.2" or "QUIC").
	Protocol string `json:"protocol"`

	// Key Exchange used by the connection, or the empty string if not applicable.
	KeyExchange string `json:"keyExchange"`

	// (EC)DH group used by the connection, if applicable.
	KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"`

	// Cipher name.
	Cipher string `json:"cipher"`

	// TLS MAC. Note that AEAD ciphers do not have separate MACs.
	Mac string `json:"mac,omitempty"`

	// Certificate ID value.
	CertificateId security.CertificateId `json:"certificateId"`

	// Certificate subject name.
	SubjectName string `json:"subjectName"`

	// Subject Alternative Name (SAN) DNS names and IP addresses.
	SanList []string `json:"sanList"`

	// Name of the issuing CA.
	Issuer string `json:"issuer"`

	// Certificate valid from date.
	ValidFrom TimeSinceEpoch `json:"validFrom"`

	// Certificate valid to (expiration) date
	ValidTo TimeSinceEpoch `json:"validTo"`

	// List of signed certificate timestamps (SCTs).
	SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"`

	// Whether the request complied with Certificate Transparency policy
	CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"`
}

Security details about a request.

type SetBlockedURLsParams

type SetBlockedURLsParams struct {

	// URL patterns to block. Wildcards ('*') are allowed.
	Urls []string `json:"urls"`
}

type SetBlockedURLsResult

type SetBlockedURLsResult struct {
}

type SetBypassServiceWorkerParams

type SetBypassServiceWorkerParams struct {

	// Bypass service worker and load from network.
	Bypass bool `json:"bypass"`
}

type SetBypassServiceWorkerResult

type SetBypassServiceWorkerResult struct {
}

type SetCacheDisabledParams

type SetCacheDisabledParams struct {

	// Cache disabled state.
	CacheDisabled bool `json:"cacheDisabled"`
}

type SetCacheDisabledResult

type SetCacheDisabledResult struct {
}

type SetCookieBlockedReason

type SetCookieBlockedReason string

Types of reasons why a cookie may not be stored from a response.

type SetCookieParams

type SetCookieParams struct {

	// Cookie name.
	Name string `json:"name"`

	// Cookie value.
	Value string `json:"value"`

	// 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.
	Url string `json:"url,omitempty"`

	// Cookie domain.
	Domain string `json:"domain,omitempty"`

	// Cookie path.
	Path string `json:"path,omitempty"`

	// True if cookie is secure.
	Secure bool `json:"secure,omitempty"`

	// True if cookie is http-only.
	HttpOnly bool `json:"httpOnly,omitempty"`

	// Cookie SameSite type.
	SameSite CookieSameSite `json:"sameSite,omitempty"`

	// Cookie expiration date, session cookie if not set
	Expires TimeSinceEpoch `json:"expires,omitempty"`
}

type SetCookieResult

type SetCookieResult struct {

	// True if successfully set cookie.
	Success bool `json:"success"`
}

type SetCookiesParams

type SetCookiesParams struct {

	// Cookies to be set.
	Cookies []*CookieParam `json:"cookies"`
}

type SetCookiesResult

type SetCookiesResult struct {
}

type SetDataSizeLimitsForTestParams

type SetDataSizeLimitsForTestParams struct {

	// Maximum total buffer size.
	MaxTotalSize int `json:"maxTotalSize"`

	// Maximum per-resource size.
	MaxResourceSize int `json:"maxResourceSize"`
}

type SetDataSizeLimitsForTestResult

type SetDataSizeLimitsForTestResult struct {
}

type SetExtraHTTPHeadersParams

type SetExtraHTTPHeadersParams struct {

	// Map with extra HTTP headers.
	Headers Headers `json:"headers"`
}

type SetExtraHTTPHeadersResult

type SetExtraHTTPHeadersResult struct {
}

type SetRequestInterceptionParams

type SetRequestInterceptionParams struct {

	// Requests matching any of these patterns will be forwarded and wait for the corresponding
	// continueInterceptedRequest call.
	Patterns []*RequestPattern `json:"patterns"`
}

type SetRequestInterceptionResult

type SetRequestInterceptionResult struct {
}

type SetUserAgentOverrideParams

type SetUserAgentOverrideParams struct {

	// User agent to use.
	UserAgent string `json:"userAgent"`

	// Browser langugage to emulate.
	AcceptLanguage string `json:"acceptLanguage,omitempty"`

	// The platform navigator.platform should return.
	Platform string `json:"platform,omitempty"`
}

type SetUserAgentOverrideResult

type SetUserAgentOverrideResult struct {
}

type SignedCertificateTimestamp

type SignedCertificateTimestamp struct {

	// Validation status.
	Status string `json:"status"`

	// Origin.
	Origin string `json:"origin"`

	// Log name / description.
	LogDescription string `json:"logDescription"`

	// Log ID.
	LogId string `json:"logId"`

	// Issuance date.
	Timestamp TimeSinceEpoch `json:"timestamp"`

	// Hash algorithm.
	HashAlgorithm string `json:"hashAlgorithm"`

	// Signature algorithm.
	SignatureAlgorithm string `json:"signatureAlgorithm"`

	// Signature data.
	SignatureData string `json:"signatureData"`
}

Details of a signed certificate timestamp (SCT).

type SignedExchangeError

type SignedExchangeError struct {

	// Error message.
	Message string `json:"message"`

	// The index of the signature which caused the error.
	SignatureIndex int `json:"signatureIndex,omitempty"`

	// The field which caused the error.
	ErrorField SignedExchangeErrorField `json:"errorField,omitempty"`
}

Information about a signed exchange response.

type SignedExchangeErrorField

type SignedExchangeErrorField string

Field type for a signed exchange related error.

type SignedExchangeHeader

type SignedExchangeHeader struct {

	// Signed exchange request URL.
	RequestUrl string `json:"requestUrl"`

	// Signed exchange response code.
	ResponseCode int `json:"responseCode"`

	// Signed exchange response headers.
	ResponseHeaders Headers `json:"responseHeaders"`

	// Signed exchange response signature.
	Signatures []*SignedExchangeSignature `json:"signatures"`

	// Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>".
	HeaderIntegrity string `json:"headerIntegrity"`
}

Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation

type SignedExchangeInfo

type SignedExchangeInfo struct {

	// The outer response of signed HTTP exchange which was received from network.
	OuterResponse Response `json:"outerResponse"`

	// Information about the signed exchange header.
	Header SignedExchangeHeader `json:"header,omitempty"`

	// Security details for the signed exchange header.
	SecurityDetails SecurityDetails `json:"securityDetails,omitempty"`

	// Errors occurred while handling the signed exchagne.
	Errors []*SignedExchangeError `json:"errors,omitempty"`
}

Information about a signed exchange response.

type SignedExchangeReceivedParams

type SignedExchangeReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Information about the signed exchange response.
	Info SignedExchangeInfo
}

type SignedExchangeSignature

type SignedExchangeSignature struct {

	// Signed exchange signature label.
	Label string `json:"label"`

	// The hex string of signed exchange signature.
	Signature string `json:"signature"`

	// Signed exchange signature integrity.
	Integrity string `json:"integrity"`

	// Signed exchange signature cert Url.
	CertUrl string `json:"certUrl,omitempty"`

	// The hex string of signed exchange signature cert sha256.
	CertSha256 string `json:"certSha256,omitempty"`

	// Signed exchange signature validity Url.
	ValidityUrl string `json:"validityUrl"`

	// Signed exchange signature date.
	Date int `json:"date"`

	// Signed exchange signature expires.
	Expires int `json:"expires"`

	// The encoded certificates.
	Certificates []string `json:"certificates,omitempty"`
}

Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1

type TakeResponseBodyForInterceptionAsStreamParams

type TakeResponseBodyForInterceptionAsStreamParams struct {

	//
	InterceptionId InterceptionId `json:"interceptionId"`
}

type TakeResponseBodyForInterceptionAsStreamResult

type TakeResponseBodyForInterceptionAsStreamResult struct {

	//
	Stream io.StreamHandle `json:"stream"`
}

type TimeSinceEpoch

type TimeSinceEpoch float64

UTC time in seconds, counted from January 1, 1970.

type WebSocketClosedParams

type WebSocketClosedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
}

type WebSocketCreatedParams

type WebSocketCreatedParams struct {

	// Request identifier.
	RequestId RequestId
	// WebSocket request URL.
	Url string
	// Request initiator.
	Initiator Initiator
}

type WebSocketFrame

type WebSocketFrame struct {

	// WebSocket message opcode.
	Opcode float64 `json:"opcode"`

	// WebSocket message mask.
	Mask bool `json:"mask"`

	// 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.
	PayloadData string `json:"payloadData"`
}

WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.

type WebSocketFrameErrorParams

type WebSocketFrameErrorParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// WebSocket error message.
	ErrorMessage string
}

type WebSocketFrameReceivedParams

type WebSocketFrameReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// WebSocket response data.
	Response WebSocketFrame
}

type WebSocketFrameSentParams

type WebSocketFrameSentParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// WebSocket response data.
	Response WebSocketFrame
}

type WebSocketHandshakeResponseReceivedParams

type WebSocketHandshakeResponseReceivedParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// WebSocket response data.
	Response WebSocketResponse
}

type WebSocketRequest

type WebSocketRequest struct {

	// HTTP request headers.
	Headers Headers `json:"headers"`
}

WebSocket request data.

type WebSocketResponse

type WebSocketResponse struct {

	// HTTP response status code.
	Status int `json:"status"`

	// HTTP response status text.
	StatusText string `json:"statusText"`

	// HTTP response headers.
	Headers Headers `json:"headers"`

	// HTTP response headers text.
	HeadersText string `json:"headersText,omitempty"`

	// HTTP request headers.
	RequestHeaders Headers `json:"requestHeaders,omitempty"`

	// HTTP request headers text.
	RequestHeadersText string `json:"requestHeadersText,omitempty"`
}

WebSocket response data.

type WebSocketWillSendHandshakeRequestParams

type WebSocketWillSendHandshakeRequestParams struct {

	// Request identifier.
	RequestId RequestId
	// Timestamp.
	Timestamp MonotonicTime
	// UTC Timestamp.
	WallTime TimeSinceEpoch
	// WebSocket request data.
	Request WebSocketRequest
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL