Skip to content

Commit

Permalink
docs: cancel is optional in OnHeadersReceivedResponse (#16548)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and codebytere committed Jan 30, 2019
1 parent 56276d2 commit 0ee1f51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/web-request.md
Expand Up @@ -32,7 +32,7 @@ const filter = {

session.defaultSession.webRequest.onBeforeSendHeaders(filter, (details, callback) => {
details.requestHeaders['User-Agent'] = 'MyAgent'
callback({ cancel: false, requestHeaders: details.requestHeaders })
callback({ requestHeaders: details.requestHeaders })
})
```

Expand Down Expand Up @@ -130,7 +130,7 @@ response are visible by the time this listener is fired.
* `responseHeaders` Object
* `callback` Function
* `response` Object
* `cancel` Boolean
* `cancel` Boolean (optional)
* `responseHeaders` Object (optional) - When provided, the server is assumed
to have responded with these headers.
* `statusLine` String (optional) - Should be provided when overriding
Expand Down

0 comments on commit 0ee1f51

Please sign in to comment.