ClientRequestConstructorOptions
Properties
can be default
, no-store
, reload
, no-cache
, force-cache
or only-if-cached
.
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).
Headers to be sent with the request.
Can be http:
or https:
. The protocol scheme in the form 'scheme:'. Defaults to 'http:'.
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
.
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
.
Whether to send cookies with this request from the provided session. If credentials
is specified, this option has no effect. Default is false
.