chrobot/protocol/network
⚙️ This module was generated from the Chrome DevTools Protocol version 1.3
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.
📖 View this domain on the DevTools Protocol API Docs
Types
The reason why request was blocked.
pub type BlockedReason {
BlockedReasonOther
BlockedReasonCsp
BlockedReasonMixedContent
BlockedReasonOrigin
BlockedReasonInspector
BlockedReasonSubresourceFilter
BlockedReasonContentType
BlockedReasonCoepFrameResourceNeedsCoepHeader
BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage
BlockedReasonCorpNotSameOrigin
BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep
BlockedReasonCorpNotSameSite
}
Constructors
-
BlockedReasonOther
-
BlockedReasonCsp
-
BlockedReasonMixedContent
-
BlockedReasonOrigin
-
BlockedReasonInspector
-
BlockedReasonSubresourceFilter
-
BlockedReasonContentType
-
BlockedReasonCoepFrameResourceNeedsCoepHeader
-
BlockedReasonCoopSandboxedIframeCannotNavigateToCoopPage
-
BlockedReasonCorpNotSameOrigin
-
BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep
-
BlockedReasonCorpNotSameSite
Information about the cached resource.
pub type CachedResource {
CachedResource(
url: String,
type_: ResourceType,
response: option.Option(Response),
body_size: Float,
)
}
Constructors
-
CachedResource( url: String, type_: ResourceType, response: option.Option(Response), body_size: Float, )
Arguments
-
url
Resource URL. This is the url of the original network request.
-
type_
Type of this resource.
-
response
Cached response data.
-
body_size
Cached response body size.
-
Whether the request complied with Certificate Transparency policy.
pub type CertificateTransparencyCompliance {
CertificateTransparencyComplianceUnknown
CertificateTransparencyComplianceNotCompliant
CertificateTransparencyComplianceCompliant
}
Constructors
-
CertificateTransparencyComplianceUnknown
-
CertificateTransparencyComplianceNotCompliant
-
CertificateTransparencyComplianceCompliant
The underlying connection technology that the browser is supposedly using.
pub type ConnectionType {
ConnectionTypeNone
ConnectionTypeCellular2g
ConnectionTypeCellular3g
ConnectionTypeCellular4g
ConnectionTypeBluetooth
ConnectionTypeEthernet
ConnectionTypeWifi
ConnectionTypeWimax
ConnectionTypeOther
}
Constructors
-
ConnectionTypeNone
-
ConnectionTypeCellular2g
-
ConnectionTypeCellular3g
-
ConnectionTypeCellular4g
-
ConnectionTypeBluetooth
-
ConnectionTypeEthernet
-
ConnectionTypeWifi
-
ConnectionTypeWimax
-
ConnectionTypeOther
Cookie object
pub type Cookie {
Cookie(
name: String,
value: String,
domain: String,
path: String,
expires: Float,
size: Int,
http_only: Bool,
secure: Bool,
session: Bool,
same_site: option.Option(CookieSameSite),
)
}
Constructors
-
Cookie( name: String, value: String, domain: String, path: String, expires: Float, size: Int, http_only: Bool, secure: Bool, session: Bool, same_site: option.Option(CookieSameSite), )
Arguments
-
name
Cookie name.
-
value
Cookie value.
-
domain
Cookie domain.
-
path
Cookie path.
-
expires
Cookie expiration date as the number of seconds since the UNIX epoch.
-
size
Cookie size.
-
http_only
True if cookie is http-only.
-
secure
True if cookie is secure.
-
session
True in case of session cookie.
-
same_site
Cookie SameSite type.
-
Cookie parameter object
pub type CookieParam {
CookieParam(
name: String,
value: String,
url: option.Option(String),
domain: option.Option(String),
path: option.Option(String),
secure: option.Option(Bool),
http_only: option.Option(Bool),
same_site: option.Option(CookieSameSite),
expires: option.Option(TimeSinceEpoch),
)
}
Constructors
-
CookieParam( name: String, value: String, url: option.Option(String), domain: option.Option(String), path: option.Option(String), secure: option.Option(Bool), http_only: option.Option(Bool), same_site: option.Option(CookieSameSite), expires: option.Option(TimeSinceEpoch), )
Arguments
-
name
Cookie name.
-
value
Cookie value.
-
url
The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
-
domain
Cookie domain.
-
path
Cookie path.
-
secure
True if cookie is secure.
-
http_only
True if cookie is http-only.
-
same_site
Cookie SameSite type.
-
expires
Cookie expiration date, session cookie if not set
-
Represents the cookie’s ‘SameSite’ status: https://tools.ietf.org/html/draft-west-first-party-cookies
pub type CookieSameSite {
CookieSameSiteStrict
CookieSameSiteLax
CookieSameSiteNone
}
Constructors
-
CookieSameSiteStrict
-
CookieSameSiteLax
-
CookieSameSiteNone
The reason why request was blocked.
pub type CorsError {
CorsErrorDisallowedByMode
CorsErrorInvalidResponse
CorsErrorWildcardOriginNotAllowed
CorsErrorMissingAllowOriginHeader
CorsErrorMultipleAllowOriginValues
CorsErrorInvalidAllowOriginValue
CorsErrorAllowOriginMismatch
CorsErrorInvalidAllowCredentials
CorsErrorCorsDisabledScheme
CorsErrorPreflightInvalidStatus
CorsErrorPreflightDisallowedRedirect
CorsErrorPreflightWildcardOriginNotAllowed
CorsErrorPreflightMissingAllowOriginHeader
CorsErrorPreflightMultipleAllowOriginValues
CorsErrorPreflightInvalidAllowOriginValue
CorsErrorPreflightAllowOriginMismatch
CorsErrorPreflightInvalidAllowCredentials
CorsErrorPreflightMissingAllowExternal
CorsErrorPreflightInvalidAllowExternal
CorsErrorPreflightMissingAllowPrivateNetwork
CorsErrorPreflightInvalidAllowPrivateNetwork
CorsErrorInvalidAllowMethodsPreflightResponse
CorsErrorInvalidAllowHeadersPreflightResponse
CorsErrorMethodDisallowedByPreflightResponse
CorsErrorHeaderDisallowedByPreflightResponse
CorsErrorRedirectContainsCredentials
CorsErrorInsecurePrivateNetwork
CorsErrorInvalidPrivateNetworkAccess
CorsErrorUnexpectedPrivateNetworkAccess
CorsErrorNoCorsRedirectModeNotFollow
CorsErrorPreflightMissingPrivateNetworkAccessId
CorsErrorPreflightMissingPrivateNetworkAccessName
CorsErrorPrivateNetworkAccessPermissionUnavailable
CorsErrorPrivateNetworkAccessPermissionDenied
}
Constructors
-
CorsErrorDisallowedByMode
-
CorsErrorInvalidResponse
-
CorsErrorWildcardOriginNotAllowed
-
CorsErrorMissingAllowOriginHeader
-
CorsErrorMultipleAllowOriginValues
-
CorsErrorInvalidAllowOriginValue
-
CorsErrorAllowOriginMismatch
-
CorsErrorInvalidAllowCredentials
-
CorsErrorCorsDisabledScheme
-
CorsErrorPreflightInvalidStatus
-
CorsErrorPreflightDisallowedRedirect
-
CorsErrorPreflightWildcardOriginNotAllowed
-
CorsErrorPreflightMissingAllowOriginHeader
-
CorsErrorPreflightMultipleAllowOriginValues
-
CorsErrorPreflightInvalidAllowOriginValue
-
CorsErrorPreflightAllowOriginMismatch
-
CorsErrorPreflightInvalidAllowCredentials
-
CorsErrorPreflightMissingAllowExternal
-
CorsErrorPreflightInvalidAllowExternal
-
CorsErrorPreflightMissingAllowPrivateNetwork
-
CorsErrorPreflightInvalidAllowPrivateNetwork
-
CorsErrorInvalidAllowMethodsPreflightResponse
-
CorsErrorInvalidAllowHeadersPreflightResponse
-
CorsErrorMethodDisallowedByPreflightResponse
-
CorsErrorHeaderDisallowedByPreflightResponse
-
CorsErrorRedirectContainsCredentials
-
CorsErrorInsecurePrivateNetwork
-
CorsErrorInvalidPrivateNetworkAccess
-
CorsErrorUnexpectedPrivateNetworkAccess
-
CorsErrorNoCorsRedirectModeNotFollow
-
CorsErrorPreflightMissingPrivateNetworkAccessId
-
CorsErrorPreflightMissingPrivateNetworkAccessName
-
CorsErrorPrivateNetworkAccessPermissionUnavailable
-
CorsErrorPrivateNetworkAccessPermissionDenied
pub type CorsErrorStatus {
CorsErrorStatus(
cors_error: CorsError,
failed_parameter: String,
)
}
Constructors
-
CorsErrorStatus(cors_error: CorsError, failed_parameter: String)
Network level fetch failure reason.
pub type ErrorReason {
ErrorReasonFailed
ErrorReasonAborted
ErrorReasonTimedOut
ErrorReasonAccessDenied
ErrorReasonConnectionClosed
ErrorReasonConnectionReset
ErrorReasonConnectionRefused
ErrorReasonConnectionAborted
ErrorReasonConnectionFailed
ErrorReasonNameNotResolved
ErrorReasonInternetDisconnected
ErrorReasonAddressUnreachable
ErrorReasonBlockedByClient
ErrorReasonBlockedByResponse
}
Constructors
-
ErrorReasonFailed
-
ErrorReasonAborted
-
ErrorReasonTimedOut
-
ErrorReasonAccessDenied
-
ErrorReasonConnectionClosed
-
ErrorReasonConnectionReset
-
ErrorReasonConnectionRefused
-
ErrorReasonConnectionAborted
-
ErrorReasonConnectionFailed
-
ErrorReasonNameNotResolved
-
ErrorReasonInternetDisconnected
-
ErrorReasonAddressUnreachable
-
ErrorReasonBlockedByClient
-
ErrorReasonBlockedByResponse
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command get_cookies
pub type GetCookiesResponse {
GetCookiesResponse(cookies: List(Cookie))
}
Constructors
-
GetCookiesResponse(cookies: List(Cookie))
Arguments
-
cookies
Array of cookie objects.
-
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command get_request_post_data
pub type GetRequestPostDataResponse {
GetRequestPostDataResponse(post_data: String)
}
Constructors
-
GetRequestPostDataResponse(post_data: String)
Arguments
-
post_data
Request body string, omitting files from multipart requests
-
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command get_response_body
pub type GetResponseBodyResponse {
GetResponseBodyResponse(body: String, base64_encoded: Bool)
}
Constructors
-
GetResponseBodyResponse(body: String, base64_encoded: Bool)
Arguments
-
body
Response body.
-
base64_encoded
True, if content was sent as base64.
-
Request / response headers as keys / values of JSON object.
pub type Headers {
Headers(dict.Dict(String, String))
}
Constructors
-
Headers(dict.Dict(String, String))
Information about the request initiator.
pub type Initiator {
Initiator(
type_: InitiatorType,
stack: option.Option(runtime.StackTrace),
url: option.Option(String),
line_number: option.Option(Float),
column_number: option.Option(Float),
request_id: option.Option(RequestId),
)
}
Constructors
-
Initiator( type_: InitiatorType, stack: option.Option(runtime.StackTrace), url: option.Option(String), line_number: option.Option(Float), column_number: option.Option(Float), request_id: option.Option(RequestId), )
Arguments
-
type_
Type of this initiator.
-
stack
Initiator JavaScript stack trace, set for Script only.
-
url
Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
-
line_number
Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).
-
column_number
Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).
-
request_id
Set if another request triggered this request (e.g. preflight).
-
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property type
of Initiator
pub type InitiatorType {
InitiatorTypeParser
InitiatorTypeScript
InitiatorTypePreload
InitiatorTypeSignedExchange
InitiatorTypePreflight
InitiatorTypeOther
}
Constructors
-
InitiatorTypeParser
-
InitiatorTypeScript
-
InitiatorTypePreload
-
InitiatorTypeSignedExchange
-
InitiatorTypePreflight
-
InitiatorTypeOther
Unique intercepted request identifier.
pub type InterceptionId {
InterceptionId(String)
}
Constructors
-
InterceptionId(String)
Unique loader identifier.
pub type LoaderId {
LoaderId(String)
}
Constructors
-
LoaderId(String)
Monotonically increasing time in seconds since an arbitrary point in the past.
pub type MonotonicTime {
MonotonicTime(Float)
}
Constructors
-
MonotonicTime(Float)
Post data entry for HTTP request
pub type PostDataEntry {
PostDataEntry(bytes: option.Option(String))
}
Constructors
-
PostDataEntry(bytes: option.Option(String))
HTTP request data.
pub type Request {
Request(
url: String,
url_fragment: option.Option(String),
method: String,
headers: Headers,
has_post_data: option.Option(Bool),
mixed_content_type: option.Option(security.MixedContentType),
initial_priority: ResourcePriority,
referrer_policy: RequestReferrerPolicy,
is_link_preload: option.Option(Bool),
)
}
Constructors
-
Request( url: String, url_fragment: option.Option(String), method: String, headers: Headers, has_post_data: option.Option(Bool), mixed_content_type: option.Option(security.MixedContentType), initial_priority: ResourcePriority, referrer_policy: RequestReferrerPolicy, is_link_preload: option.Option(Bool), )
Arguments
-
url
Request URL (without fragment).
-
url_fragment
Fragment of the requested URL starting with hash, if present.
-
method
HTTP request method.
-
headers
HTTP request headers.
-
has_post_data
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.
-
mixed_content_type
The mixed content type of the request.
-
initial_priority
Priority of the resource request at the time request is sent.
-
referrer_policy
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
-
is_link_preload
Whether is loaded via link preload.
-
Unique request identifier.
pub type RequestId {
RequestId(String)
}
Constructors
-
RequestId(String)
This type is not part of the protocol spec, it has been generated dynamically
to represent the possible values of the enum property referrerPolicy
of Request
pub type RequestReferrerPolicy {
RequestReferrerPolicyUnsafeUrl
RequestReferrerPolicyNoReferrerWhenDowngrade
RequestReferrerPolicyNoReferrer
RequestReferrerPolicyOrigin
RequestReferrerPolicyOriginWhenCrossOrigin
RequestReferrerPolicySameOrigin
RequestReferrerPolicyStrictOrigin
RequestReferrerPolicyStrictOriginWhenCrossOrigin
}
Constructors
-
RequestReferrerPolicyUnsafeUrl
-
RequestReferrerPolicyNoReferrerWhenDowngrade
-
RequestReferrerPolicyNoReferrer
-
RequestReferrerPolicyOrigin
-
RequestReferrerPolicyOriginWhenCrossOrigin
-
RequestReferrerPolicySameOrigin
-
RequestReferrerPolicyStrictOrigin
-
RequestReferrerPolicyStrictOriginWhenCrossOrigin
Loading priority of a resource request.
pub type ResourcePriority {
ResourcePriorityVeryLow
ResourcePriorityLow
ResourcePriorityMedium
ResourcePriorityHigh
ResourcePriorityVeryHigh
}
Constructors
-
ResourcePriorityVeryLow
-
ResourcePriorityLow
-
ResourcePriorityMedium
-
ResourcePriorityHigh
-
ResourcePriorityVeryHigh
Timing information for the request.
pub type ResourceTiming {
ResourceTiming(
request_time: Float,
proxy_start: Float,
proxy_end: Float,
dns_start: Float,
dns_end: Float,
connect_start: Float,
connect_end: Float,
ssl_start: Float,
ssl_end: Float,
send_start: Float,
send_end: Float,
receive_headers_end: Float,
)
}
Constructors
-
ResourceTiming( request_time: Float, proxy_start: Float, proxy_end: Float, dns_start: Float, dns_end: Float, connect_start: Float, connect_end: Float, ssl_start: Float, ssl_end: Float, send_start: Float, send_end: Float, receive_headers_end: Float, )
Arguments
-
request_time
Timing’s requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
-
proxy_start
Started resolving proxy.
-
proxy_end
Finished resolving proxy.
-
dns_start
Started DNS address resolve.
-
dns_end
Finished DNS address resolve.
-
connect_start
Started connecting to the remote host.
-
connect_end
Connected to the remote host.
-
ssl_start
Started SSL handshake.
-
ssl_end
Finished SSL handshake.
-
send_start
Started sending request.
-
send_end
Finished sending request.
-
receive_headers_end
Finished receiving response headers.
-
Resource type as it was perceived by the rendering engine.
pub type ResourceType {
ResourceTypeDocument
ResourceTypeStylesheet
ResourceTypeImage
ResourceTypeMedia
ResourceTypeFont
ResourceTypeScript
ResourceTypeTextTrack
ResourceTypeXhr
ResourceTypeFetch
ResourceTypePrefetch
ResourceTypeEventSource
ResourceTypeWebSocket
ResourceTypeManifest
ResourceTypeSignedExchange
ResourceTypePing
ResourceTypeCspViolationReport
ResourceTypePreflight
ResourceTypeOther
}
Constructors
-
ResourceTypeDocument
-
ResourceTypeStylesheet
-
ResourceTypeImage
-
ResourceTypeMedia
-
ResourceTypeFont
-
ResourceTypeScript
-
ResourceTypeTextTrack
-
ResourceTypeXhr
-
ResourceTypeFetch
-
ResourceTypePrefetch
-
ResourceTypeEventSource
-
ResourceTypeWebSocket
-
ResourceTypeManifest
-
ResourceTypeSignedExchange
-
ResourceTypePing
-
ResourceTypeCspViolationReport
-
ResourceTypePreflight
-
ResourceTypeOther
HTTP response data.
pub type Response {
Response(
url: String,
status: Int,
status_text: String,
headers: Headers,
mime_type: String,
charset: String,
request_headers: option.Option(Headers),
connection_reused: Bool,
connection_id: Float,
remote_ip_address: option.Option(String),
remote_port: option.Option(Int),
from_disk_cache: option.Option(Bool),
from_service_worker: option.Option(Bool),
from_prefetch_cache: option.Option(Bool),
from_early_hints: option.Option(Bool),
encoded_data_length: Float,
timing: option.Option(ResourceTiming),
service_worker_response_source: option.Option(
ServiceWorkerResponseSource,
),
response_time: option.Option(TimeSinceEpoch),
cache_storage_cache_name: option.Option(String),
protocol: option.Option(String),
security_state: security.SecurityState,
security_details: option.Option(SecurityDetails),
)
}
Constructors
-
Response( url: String, status: Int, status_text: String, headers: Headers, mime_type: String, charset: String, request_headers: option.Option(Headers), connection_reused: Bool, connection_id: Float, remote_ip_address: option.Option(String), remote_port: option.Option(Int), from_disk_cache: option.Option(Bool), from_service_worker: option.Option(Bool), from_prefetch_cache: option.Option(Bool), from_early_hints: option.Option(Bool), encoded_data_length: Float, timing: option.Option(ResourceTiming), service_worker_response_source: option.Option( ServiceWorkerResponseSource, ), response_time: option.Option(TimeSinceEpoch), cache_storage_cache_name: option.Option(String), protocol: option.Option(String), security_state: security.SecurityState, security_details: option.Option(SecurityDetails), )
Arguments
-
url
Response URL. This URL can be different from CachedResource.url in case of redirect.
-
status
HTTP response status code.
-
status_text
HTTP response status text.
-
headers
HTTP response headers.
-
mime_type
Resource mimeType as determined by the browser.
-
charset
Resource charset as determined by the browser (if applicable).
-
request_headers
Refined HTTP request headers that were actually transmitted over the network.
-
connection_reused
Specifies whether physical connection was actually reused for this request.
-
connection_id
Physical connection id that was actually used for this request.
-
remote_ip_address
Remote IP address.
-
remote_port
Remote port.
-
from_disk_cache
Specifies that the request was served from the disk cache.
-
from_service_worker
Specifies that the request was served from the ServiceWorker.
-
from_prefetch_cache
Specifies that the request was served from the prefetch cache.
-
from_early_hints
Specifies that the request was served from the prefetch cache.
-
encoded_data_length
Total number of bytes received for this request so far.
-
timing
Timing information for the given request.
-
service_worker_response_source
Response source of response from ServiceWorker.
-
response_time
The time at which the returned response was generated.
-
cache_storage_cache_name
Cache Storage Cache Name.
-
protocol
Protocol used to fetch this request.
-
security_state
Security state of the request resource.
-
security_details
Security details for the request.
-
Security details about a request.
pub type SecurityDetails {
SecurityDetails(
protocol: String,
key_exchange: String,
key_exchange_group: option.Option(String),
cipher: String,
mac: option.Option(String),
certificate_id: security.CertificateId,
subject_name: String,
san_list: List(String),
issuer: String,
valid_from: TimeSinceEpoch,
valid_to: TimeSinceEpoch,
signed_certificate_timestamp_list: List(
SignedCertificateTimestamp,
),
certificate_transparency_compliance: CertificateTransparencyCompliance,
server_signature_algorithm: option.Option(Int),
encrypted_client_hello: Bool,
)
}
Constructors
-
SecurityDetails( protocol: String, key_exchange: String, key_exchange_group: option.Option(String), cipher: String, mac: option.Option(String), certificate_id: security.CertificateId, subject_name: String, san_list: List(String), issuer: String, valid_from: TimeSinceEpoch, valid_to: TimeSinceEpoch, signed_certificate_timestamp_list: List( SignedCertificateTimestamp, ), certificate_transparency_compliance: CertificateTransparencyCompliance, server_signature_algorithm: option.Option(Int), encrypted_client_hello: Bool, )
Arguments
-
protocol
Protocol name (e.g. “TLS 1.2” or “QUIC”).
-
key_exchange
Key Exchange used by the connection, or the empty string if not applicable.
-
key_exchange_group
(EC)DH group used by the connection, if applicable.
-
cipher
Cipher name.
-
mac
TLS MAC. Note that AEAD ciphers do not have separate MACs.
-
certificate_id
Certificate ID value.
-
subject_name
Certificate subject name.
-
san_list
Subject Alternative Name (SAN) DNS names and IP addresses.
-
issuer
Name of the issuing CA.
-
valid_from
Certificate valid from date.
-
valid_to
Certificate valid to (expiration) date
-
signed_certificate_timestamp_list
List of signed certificate timestamps (SCTs).
-
certificate_transparency_compliance
Whether the request complied with Certificate Transparency policy
-
server_signature_algorithm
The signature algorithm used by the server in the TLS server signature, represented as a TLS SignatureScheme code point. Omitted if not applicable or not known.
-
encrypted_client_hello
Whether the connection used Encrypted ClientHello
-
Source of serviceworker response.
pub type ServiceWorkerResponseSource {
ServiceWorkerResponseSourceCacheStorage
ServiceWorkerResponseSourceHttpCache
ServiceWorkerResponseSourceFallbackCode
ServiceWorkerResponseSourceNetwork
}
Constructors
-
ServiceWorkerResponseSourceCacheStorage
-
ServiceWorkerResponseSourceHttpCache
-
ServiceWorkerResponseSourceFallbackCode
-
ServiceWorkerResponseSourceNetwork
Source of service worker router.
pub type ServiceWorkerRouterSource {
ServiceWorkerRouterSourceNetwork
ServiceWorkerRouterSourceCache
ServiceWorkerRouterSourceFetchEvent
ServiceWorkerRouterSourceRaceNetworkAndFetchHandler
}
Constructors
-
ServiceWorkerRouterSourceNetwork
-
ServiceWorkerRouterSourceCache
-
ServiceWorkerRouterSourceFetchEvent
-
ServiceWorkerRouterSourceRaceNetworkAndFetchHandler
Details of a signed certificate timestamp (SCT).
pub type SignedCertificateTimestamp {
SignedCertificateTimestamp(
status: String,
origin: String,
log_description: String,
log_id: String,
timestamp: Float,
hash_algorithm: String,
signature_algorithm: String,
signature_data: String,
)
}
Constructors
-
SignedCertificateTimestamp( status: String, origin: String, log_description: String, log_id: String, timestamp: Float, hash_algorithm: String, signature_algorithm: String, signature_data: String, )
Arguments
-
status
Validation status.
-
origin
Origin.
-
log_description
Log name / description.
-
log_id
Log ID.
-
timestamp
Issuance date. Unlike TimeSinceEpoch, this contains the number of milliseconds since January 1, 1970, UTC, not the number of seconds.
-
hash_algorithm
Hash algorithm.
-
signature_algorithm
Signature algorithm.
-
signature_data
Signature data.
-
UTC time in seconds, counted from January 1, 1970.
pub type TimeSinceEpoch {
TimeSinceEpoch(Float)
}
Constructors
-
TimeSinceEpoch(Float)
WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
pub type WebSocketFrame {
WebSocketFrame(opcode: Float, mask: Bool, payload_data: String)
}
Constructors
-
WebSocketFrame(opcode: Float, mask: Bool, payload_data: String)
Arguments
-
opcode
WebSocket message opcode.
-
mask
WebSocket message mask.
-
payload_data
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.
-
WebSocket request data.
pub type WebSocketRequest {
WebSocketRequest(headers: Headers)
}
Constructors
-
WebSocketRequest(headers: Headers)
Arguments
-
headers
HTTP request headers.
-
WebSocket response data.
pub type WebSocketResponse {
WebSocketResponse(
status: Int,
status_text: String,
headers: Headers,
headers_text: option.Option(String),
request_headers: option.Option(Headers),
request_headers_text: option.Option(String),
)
}
Constructors
-
WebSocketResponse( status: Int, status_text: String, headers: Headers, headers_text: option.Option(String), request_headers: option.Option(Headers), request_headers_text: option.Option(String), )
Arguments
-
status
HTTP response status code.
-
status_text
HTTP response status text.
-
headers
HTTP response headers.
-
headers_text
HTTP response headers text.
-
request_headers
HTTP request headers.
-
request_headers_text
HTTP request headers text.
-
Functions
pub fn clear_browser_cache(
callback__: fn(String, Option(a)) -> b,
) -> b
Clears browser cache.
pub fn clear_browser_cookies(
callback__: fn(String, Option(a)) -> b,
) -> b
Clears browser cookies.
pub fn delete_cookies(
callback__: fn(String, Option(Json)) -> a,
name name: String,
url url: Option(String),
domain domain: Option(String),
path path: Option(String),
partition_key partition_key: Option(String),
) -> a
Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
Parameters:
name
: Name of the cookies to remove.url
: If specified, deletes all the cookies with the given name where domain and path match provided URL.domain
: If specified, deletes only cookies with the exact domain.path
: If specified, deletes only cookies with the exact path.partition_key
: If specified, deletes only cookies with the the given name and partitionKey where domain matches provided URL.
Returns:
pub fn disable(callback__: fn(String, Option(a)) -> b) -> b
Disables network tracking, prevents network events from being sent to the client.
pub fn emulate_network_conditions(
callback__: fn(String, Option(Json)) -> a,
offline offline: Bool,
latency latency: Float,
download_throughput download_throughput: Float,
upload_throughput upload_throughput: Float,
connection_type connection_type: Option(ConnectionType),
) -> a
Activates emulation of network conditions.
Parameters:
offline
: True to emulate internet disconnection.latency
: Minimum latency from request sent to response headers received (ms).download_throughput
: Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.upload_throughput
: Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.connection_type
: Connection type if known.
Returns:
pub fn enable(
callback__: fn(String, Option(Json)) -> a,
max_post_data_size max_post_data_size: Option(Int),
) -> a
Enables network tracking, network events will now be delivered to the client.
Parameters:
max_post_data_size
: Longest post body size (in bytes) that would be included in requestWillBeSent notification
Returns:
pub fn get_cookies(
callback__: fn(String, Option(Json)) ->
Result(Dynamic, RequestError),
urls urls: Option(List(String)),
) -> Result(GetCookiesResponse, RequestError)
Returns all browser cookies for the current URL. Depending on the backend support, will return
detailed cookie information in the cookies
field.
Parameters:
urls
: The list of URLs for which applicable cookies will be fetched. If not specified, it’s assumed to be set to the list containing the URLs of the page and all of its subframes.
Returns:
cookies
: Array of cookie objects.
pub fn get_request_post_data(
callback__: fn(String, Option(Json)) ->
Result(Dynamic, RequestError),
request_id request_id: RequestId,
) -> Result(GetRequestPostDataResponse, RequestError)
Returns post data sent with the request. Returns an error when no data was sent with the request.
Parameters:
request_id
: Identifier of the network request to get content for.
Returns:
post_data
: Request body string, omitting files from multipart requests
pub fn get_response_body(
callback__: fn(String, Option(Json)) ->
Result(Dynamic, RequestError),
request_id request_id: RequestId,
) -> Result(GetResponseBodyResponse, RequestError)
Returns content served for the given request.
Parameters:
request_id
: Identifier of the network request to get content for.
Returns:
body
: Response body.base64_encoded
: True, if content was sent as base64.
pub fn set_bypass_service_worker(
callback__: fn(String, Option(Json)) -> a,
bypass bypass: Bool,
) -> a
Toggles ignoring of service worker for each request.
Parameters:
bypass
: Bypass service worker and load from network.
Returns:
pub fn set_cache_disabled(
callback__: fn(String, Option(Json)) -> a,
cache_disabled cache_disabled: Bool,
) -> a
Toggles ignoring cache for each request. If true
, cache will not be used.
Parameters:
cache_disabled
: Cache disabled state.
Returns:
pub fn set_cookie(
callback__: fn(String, Option(Json)) -> a,
name name: String,
value value: String,
url url: Option(String),
domain domain: Option(String),
path path: Option(String),
secure secure: Option(Bool),
http_only http_only: Option(Bool),
same_site same_site: Option(CookieSameSite),
expires expires: Option(TimeSinceEpoch),
) -> a
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Parameters:
name
: Cookie name.value
: Cookie value.url
: The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.domain
: Cookie domain.path
: Cookie path.secure
: True if cookie is secure.http_only
: True if cookie is http-only.same_site
: Cookie SameSite type.expires
: Cookie expiration date, session cookie if not set
Returns:
pub fn set_cookies(
callback__: fn(String, Option(Json)) -> a,
cookies cookies: List(CookieParam),
) -> a
Sets given cookies.
Parameters:
cookies
: Cookies to be set.
Returns:
pub fn set_extra_http_headers(
callback__: fn(String, Option(Json)) -> a,
headers headers: Headers,
) -> a
Specifies whether to always send extra HTTP headers with the requests from this page.
Parameters:
headers
: Map with extra HTTP headers.
Returns:
pub fn set_user_agent_override(
callback__: fn(String, Option(Json)) -> a,
user_agent user_agent: String,
accept_language accept_language: Option(String),
platform platform: Option(String),
) -> a
Allows overriding user agent with the given string.
Parameters:
user_agent
: User agent to use.accept_language
: Browser language to emulate.platform
: The platform navigator.platform should return.
Returns: