From e2516dc8085e1b9046172c72e6b2d7f625e4b1bc Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Fri, 25 Jan 2019 15:41:21 +0100 Subject: [PATCH] docs: `cancel` is optional in `OnHeadersReceivedResponse` (#16506) --- docs/api/web-request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/web-request.md b/docs/api/web-request.md index 373626561f8a..0da76779b92e 100644 --- a/docs/api/web-request.md +++ b/docs/api/web-request.md @@ -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 }) }) ``` @@ -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