Skip to content

ElectronClientRequestConstructorOptions

Unofficial

Options for constructing a ClientRequest.

Import:

import type { ElectronClientRequestConstructorOptions } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronClientRequestConstructorOptions

Properties

PropertyTypeDescription
credentials?'include' | 'omit'Can be include or omit. 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). 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).
host?stringThe server host provided as a concatenation of the hostname and the port number 'hostname:port'.
hostname?stringThe server host name.
method?stringThe HTTP request method.
origin?stringThe origin URL of the request.
partition?stringThe name of the partition with which the request is associated. The session option supersedes partition. Thus if a session is explicitly specified, partition is ignored.
path?stringThe path part of the request URL.
port?numberThe server's listening port number.
protocol?stringCan be http: or https:. The protocol scheme in the form 'scheme:'.
redirect?'error' | 'follow' | 'manual'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.
session?SessionThe Session instance with which the request is associated.
url?stringThe request URL. Must be provided in the absolute form with the protocol scheme specified as http or https.
useSessionCookies?booleanWhether to send cookies with this request from the provided session. If credentials is specified, this option has no effect.