docs: fix web-request.md listener signatures in electron.d.ts (#16485)
This commit is contained in:
parent
7d71ad6f91
commit
dbc5f67dca
1 changed files with 31 additions and 33 deletions
|
@ -73,25 +73,24 @@ The `callback` has to be called with an `response` object.
|
|||
* `urls` String[] - Array of URL patterns that will be used to filter out the
|
||||
requests that do not match the URL patterns.
|
||||
* `listener` Function
|
||||
* `details` Object
|
||||
* `id` Integer
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `webContentsId` Integer (optional)
|
||||
* `resourceType` String
|
||||
* `timestamp` Double
|
||||
* `requestHeaders` Object
|
||||
* `callback` Function
|
||||
* `response` Object
|
||||
* `cancel` Boolean (optional)
|
||||
* `requestHeaders` Object (optional) - When provided, request will be made
|
||||
with these headers.
|
||||
|
||||
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.
|
||||
|
||||
* `details` Object
|
||||
* `id` Integer
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `webContentsId` Integer (optional)
|
||||
* `resourceType` String
|
||||
* `timestamp` Double
|
||||
* `requestHeaders` Object
|
||||
* `callback` Function
|
||||
* `response` Object
|
||||
* `cancel` Boolean (optional)
|
||||
* `requestHeaders` Object (optional) - When provided, request will be made
|
||||
with these headers.
|
||||
|
||||
The `callback` has to be called with an `response` object.
|
||||
|
||||
#### `webRequest.onSendHeaders([filter, ]listener)`
|
||||
|
@ -119,29 +118,28 @@ response are visible by the time this listener is fired.
|
|||
* `urls` String[] - Array of URL patterns that will be used to filter out the
|
||||
requests that do not match the URL patterns.
|
||||
* `listener` Function
|
||||
* `details` Object
|
||||
* `id` Integer
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `webContentsId` Integer (optional)
|
||||
* `resourceType` String
|
||||
* `timestamp` Double
|
||||
* `statusLine` String
|
||||
* `statusCode` Integer
|
||||
* `responseHeaders` Object
|
||||
* `callback` Function
|
||||
* `response` Object
|
||||
* `cancel` Boolean
|
||||
* `responseHeaders` Object (optional) - When provided, the server is assumed
|
||||
to have responded with these headers.
|
||||
* `statusLine` String (optional) - Should be provided when overriding
|
||||
`responseHeaders` to change header status otherwise original response
|
||||
header's status will be used.
|
||||
|
||||
The `listener` will be called with `listener(details, callback)` when HTTP
|
||||
response headers of a request have been received.
|
||||
|
||||
* `details` Object
|
||||
* `id` Integer
|
||||
* `url` String
|
||||
* `method` String
|
||||
* `webContentsId` Integer (optional)
|
||||
* `resourceType` String
|
||||
* `timestamp` Double
|
||||
* `statusLine` String
|
||||
* `statusCode` Integer
|
||||
* `responseHeaders` Object
|
||||
* `callback` Function
|
||||
* `response` Object
|
||||
* `cancel` Boolean
|
||||
* `responseHeaders` Object (optional) - When provided, the server is assumed
|
||||
to have responded with these headers.
|
||||
* `statusLine` String (optional) - Should be provided when overriding
|
||||
`responseHeaders` to change header status otherwise original response
|
||||
header's status will be used.
|
||||
|
||||
The `callback` has to be called with an `response` object.
|
||||
|
||||
#### `webRequest.onResponseStarted([filter, ]listener)`
|
||||
|
|
Loading…
Reference in a new issue