ClientRequestConstructorOptions

Properties

Link copied to clipboard

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

Link copied to clipboard

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).

Link copied to clipboard
abstract var headers: ReadonlyRecord<String, Any>?

Headers to be sent with the request.

Link copied to clipboard
abstract var host: String?

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

Link copied to clipboard
abstract var hostname: String?

The server host name.

Link copied to clipboard
abstract var method: String?

The HTTP request method. Defaults to the GET method.

Link copied to clipboard
abstract var origin: String?

The origin URL of the request.

Link copied to clipboard
abstract var 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.

Link copied to clipboard
abstract var path: String?

The path part of the request URL.

Link copied to clipboard
abstract var port: Double?

The server's listening port number.

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard
abstract var referrerPolicy: String?

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.

Link copied to clipboard
abstract var session: Session?

The Session instance with which the request is associated.

Link copied to clipboard
abstract var url: String?

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

Link copied to clipboard
abstract var useSessionCookies: Boolean?

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