Header menu logo fable-electron-docs-api

WebRequest Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Instance members

Instance member Description

this.onBeforeRedirect (?filter, ?listener)

Full Usage: this.onBeforeRedirect (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details) when a server initiated redirect is about to occur.

?filter : WebRequestFilter
?listener : Option<(Details -> unit)>

this.onBeforeRequest (?filter, ?listener)

Full Usage: this.onBeforeRequest (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details, callback) when a request is about to occur.The uploadData is an array of UploadData objects.The callback has to be called with an response object.Some examples of valid urls:

?filter : WebRequestFilter
?listener : Option<(Details * Response -> unit -> unit)>

this.onBeforeSendHeaders (?filter, ?listener)

Full Usage: this.onBeforeSendHeaders (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details, callback) before sending an HTTP request, once the request headers are available. This may occur after a TCP connection is made to the server, but before any http data is sent.The callback has to be called with a response object.

?filter : WebRequestFilter
?listener : Option<(Details * BeforeSendResponse -> unit -> unit)>

this.onCompleted (?filter, ?listener)

Full Usage: this.onCompleted (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details) when a request is completed.

?filter : WebRequestFilter
?listener : Option<(Details -> unit)>

this.onErrorOccurred (?filter, ?listener)

Full Usage: this.onErrorOccurred (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details) when an error occurs.

?filter : WebRequestFilter
?listener : Option<(Details -> unit)>

this.onHeadersReceived (?filter, ?listener)

Full Usage: this.onHeadersReceived (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details, callback) when HTTP response headers of a request have been received.The callback has to be called with a response object.

?filter : WebRequestFilter
?listener : Option<(Details * HeadersReceivedResponse -> unit -> unit)>

this.onResponseStarted (?filter, ?listener)

Full Usage: this.onResponseStarted (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details) when first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available.

?filter : WebRequestFilter
?listener : Option<(Details -> unit)>

this.onSendHeaders (?filter, ?listener)

Full Usage: this.onSendHeaders (?filter, ?listener)

Parameters:
Modifiers: inline

The listener will be called with listener(details) just before a request is going to be sent to the server, modifications of previous onBeforeSendHeaders response are visible by the time this listener is fired.

?filter : WebRequestFilter
?listener : Option<(Details -> unit)>

Type something to start searching.