Header menu logo fable-electron-docs-api

Options Type

Constructors

Constructor Description

Options(?method, ?url, ?headers, ?session, ?partition, ?credentials, ?useSessionCookies, ?protocol, ?host, ?hostname, ?port, ?path, ?redirect, ?origin, ?referrerPolicy, ?cache, ?priority, ?priorityIncremental)

Full Usage: Options(?method, ?url, ?headers, ?session, ?partition, ?credentials, ?useSessionCookies, ?protocol, ?host, ?hostname, ?port, ?path, ?redirect, ?origin, ?referrerPolicy, ?cache, ?priority, ?priorityIncremental)

Parameters:
    ?method : string - The HTTP request method. Defaults to the GET method.
    ?url : string - The request URL. Must be provided in the absolute form with the protocol scheme specified as http or https.
    ?headers : Record<string, U2<string, string[]>> - Headers to be sent with the request.
    ?session : Session - The Session instance with which the request is associated.
    ?partition : string - The name of the partition with which the request is associated. Defaults to the empty string. The session option supersedes partition. Thus if a session is explicitly specified, partition is ignored.
    ?credentials : Credentials - Can be include, omit or same-origin. Whether to send credentials with this request. If set to include, credentials from the session associated with the request will be used. If set to omit, credentials will not be sent with the request (and the 'login' event will not be triggered in the event of a 401). If set to same-origin, origin must also be specified. This matches the behavior of the fetch option of the same name. If this option is not specified, authentication data from the session will be sent, and cookies will not be sent (unless useSessionCookies is set).
    ?useSessionCookies : bool - Whether to send cookies with this request from the provided session. If credentials is specified, this option has no effect. Default is false.
    ?protocol : Protocol - Can be http: or https:. The protocol scheme in the form 'scheme:'. Defaults to 'http:'.
    ?host : string - The server host provided as a concatenation of the hostname and the port number 'hostname:port'.
    ?hostname : string - The server host name.
    ?port : int - The server's listening port number.
    ?path : string - The path part of the request URL.
    ?redirect : Redirect - Can be follow, error or manual. The redirect mode for this request. When mode is error, any redirection will be aborted. When mode is manual the redirection will be cancelled unless request.followRedirect is invoked synchronously during the redirect event. Defaults to follow.
    ?origin : string - The origin URL of the request.
    ?referrerPolicy : ReferrerPolicy - can be "", no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, unsafe-url, same-origin, strict-origin, or strict-origin-when-cross-origin. Defaults to strict-origin-when-cross-origin.
    ?cache : Cache - can be default, no-store, reload, no-cache, force-cache or only-if-cached.
    ?priority : Priority - can be throttled, idle, lowest, low, medium, or highest. Defaults to idle.
    ?priorityIncremental : bool - the incremental loading flag as part of HTTP extensible priorities (RFC 9218). Default is true.

Returns: Options
?method : string

The HTTP request method. Defaults to the GET method.

?url : string

The request URL. Must be provided in the absolute form with the protocol scheme specified as http or https.

?headers : Record<string, U2<string, string[]>>

Headers to be sent with the request.

?session : Session

The Session instance with which the request is associated.

?partition : string

The name of the partition with which the request is associated. Defaults to the empty string. The session option supersedes partition. Thus if a session is explicitly specified, partition is ignored.

?credentials : Credentials

Can be include, omit or same-origin. Whether to send credentials with this request. If set to include, credentials from the session associated with the request will be used. If set to omit, credentials will not be sent with the request (and the 'login' event will not be triggered in the event of a 401). If set to same-origin, origin must also be specified. This matches the behavior of the fetch option of the same name. If this option is not specified, authentication data from the session will be sent, and cookies will not be sent (unless useSessionCookies is set).

?useSessionCookies : bool

Whether to send cookies with this request from the provided session. If credentials is specified, this option has no effect. Default is false.

?protocol : Protocol

Can be http: or https:. The protocol scheme in the form 'scheme:'. Defaults to 'http:'.

?host : string

The server host provided as a concatenation of the hostname and the port number 'hostname:port'.

?hostname : string

The server host name.

?port : int

The server's listening port number.

?path : string

The path part of the request URL.

?redirect : Redirect

Can be follow, error or manual. The redirect mode for this request. When mode is error, any redirection will be aborted. When mode is manual the redirection will be cancelled unless request.followRedirect is invoked synchronously during the redirect event. Defaults to follow.

?origin : string

The origin URL of the request.

?referrerPolicy : ReferrerPolicy

can be "", no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, unsafe-url, same-origin, strict-origin, or strict-origin-when-cross-origin. Defaults to strict-origin-when-cross-origin.

?cache : Cache

can be default, no-store, reload, no-cache, force-cache or only-if-cached.

?priority : Priority

can be throttled, idle, lowest, low, medium, or highest. Defaults to idle.

?priorityIncremental : bool

the incremental loading flag as part of HTTP extensible priorities (RFC 9218). Default is true.

Returns: Options

Instance members

Instance member Description

this.cache

Full Usage: this.cache

can be default, no-store, reload, no-cache, force-cache or only-if-cached.

this.credentials

Full Usage: this.credentials

Can be include, omit or same-origin. Whether to send credentials with this request. If set to include, credentials from the session associated with the request will be used. If set to omit, credentials will not be sent with the request (and the 'login' event will not be triggered in the event of a 401). If set to same-origin, origin must also be specified. This matches the behavior of the fetch option of the same name. If this option is not specified, authentication data from the session will be sent, and cookies will not be sent (unless useSessionCookies is set).

this.headers

Full Usage: this.headers

Headers to be sent with the request.

this.host

Full Usage: this.host

The server host provided as a concatenation of the hostname and the port number 'hostname:port'.

this.hostname

Full Usage: this.hostname

The server host name.

this.method

Full Usage: this.method

The HTTP request method. Defaults to the GET method.

this.origin

Full Usage: this.origin

The origin URL of the request.

this.partition

Full Usage: this.partition

The name of the partition with which the request is associated. Defaults to the empty string. The session option supersedes partition. Thus if a session is explicitly specified, partition is ignored.

this.path

Full Usage: this.path

The path part of the request URL.

this.port

Full Usage: this.port

The server's listening port number.

this.priority

Full Usage: this.priority

can be throttled, idle, lowest, low, medium, or highest. Defaults to idle.

this.priorityIncremental

Full Usage: this.priorityIncremental

the incremental loading flag as part of HTTP extensible priorities (RFC 9218). Default is true.

this.protocol

Full Usage: this.protocol

Can be http: or https:. The protocol scheme in the form 'scheme:'. Defaults to 'http:'.

this.redirect

Full Usage: this.redirect

Can be follow, error or manual. The redirect mode for this request. When mode is error, any redirection will be aborted. When mode is manual the redirection will be cancelled unless request.followRedirect is invoked synchronously during the redirect event. Defaults to follow.

this.referrerPolicy

Full Usage: this.referrerPolicy

can be "", no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, unsafe-url, same-origin, strict-origin, or strict-origin-when-cross-origin. Defaults to strict-origin-when-cross-origin.

this.session

Full Usage: this.session

The Session instance with which the request is associated.

this.url

Full Usage: this.url

The request URL. Must be provided in the absolute form with the protocol scheme specified as http or https.

this.useSessionCookies

Full Usage: this.useSessionCookies

Whether to send cookies with this request from the provided session. If credentials is specified, this option has no effect. Default is false.

Type something to start searching.