Index: third_party/WebKit/Source/core/inspector/browser_protocol.json |
diff --git a/third_party/WebKit/Source/core/inspector/browser_protocol.json b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
index 0060d55ef89f30e039effde25b5e314377b9e6e6..2e35ba2141b7d6d02bcb51e2d1234a8e76b0b5fe 100644 |
--- a/third_party/WebKit/Source/core/inspector/browser_protocol.json |
+++ b/third_party/WebKit/Source/core/inspector/browser_protocol.json |
@@ -1112,6 +1112,17 @@ |
"description": "Unique request identifier." |
}, |
{ |
+ "id": "InterceptId", |
dgozman
2017/05/22 22:27:04
InterceptionId ?
alex clarke (OOO till 29th)
2017/05/23 15:46:56
Done.
|
+ "type": "string", |
+ "description": "Unique intercepted request identifier." |
+ }, |
+ { |
+ "id": "ErrorReason", |
+ "type": "string", |
+ "enum": ["Failed", "Aborted", "TimedOut", "AccessDenied", "ConnectionClosed", "ConnectionReset", "ConnectionRefused", "ConnectionAborted", "ConnectionFailed", "NameNotResolved", "InternetDisconnected", "AddressUnreachable"], |
+ "description": "Network level fetch failure reason." |
+ }, |
+ { |
"id": "Timestamp", |
"type": "number", |
"description": "Number of seconds since epoch." |
@@ -1495,6 +1506,51 @@ |
{ "name": "tableNames", "type": "array", "items": { "type": "string" } } |
], |
"experimental": true |
+ }, |
+ { |
+ "name": "enableFetchInterception", |
+ "parameters": [ |
+ { "name": "enabled", "type": "boolean", "description": "Whether or not HTTP requests should be intercepted and Network.interceptedRequest events sent." } |
+ ], |
+ "experimental": true |
+ }, |
+ { |
+ "name": "allowRequest", |
+ "description": "Response to Network.interceptedRequest which allows the request to proceed unchanged.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" } |
+ ], |
+ "experimental": true |
+ }, |
+ { |
+ "name": "blockRequest", |
+ "description": "Response to Network.interceptedRequest which causes the request to fail.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" }, |
+ { "name": "errorReason", "$ref": "ErrorReason" } |
+ ], |
+ "experimental": true |
+ }, |
+ { |
+ "name": "modifyRequest", |
dgozman
2017/05/22 22:27:04
What do you think about converging these methods i
alex clarke (OOO till 29th)
2017/05/23 15:46:56
I guess it cuts down on the plumbing slightly. Sl
|
+ "description": "Response to Network.interceptedRequest which modifies any or all fetch parameters before allowing the request to proceed.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" }, |
+ { "name": "url", "type": "string", "optional": true }, |
+ { "name": "method", "type": "string", "optional": true }, |
+ { "name": "postData", "type": "string", "optional": true }, |
+ { "name": "headers", "$ref": "Headers", "optional": true } |
+ ], |
+ "experimental": true |
+ }, |
+ { |
+ "name": "mockResponse", |
+ "description": "Response to Network.interceptedRequest which makes the request complete with the provided mock response.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" }, |
+ { "name": "rawResponse", "type": "string" } |
dgozman
2017/05/22 22:27:04
Is this base64-encoded?
alex clarke (OOO till 29th)
2017/05/23 15:46:56
Done.
|
+ ], |
+ "experimental": true |
} |
], |
"events": [ |
@@ -1655,6 +1711,26 @@ |
{ "name": "data", "type": "string", "description": "Message content." } |
], |
"experimental": true |
+ }, |
+ { |
+ "name": "interceptedRequest", |
dgozman
2017/05/22 22:27:04
We usually name events with noun first: requestInt
alex clarke (OOO till 29th)
2017/05/23 15:46:56
Done.
|
+ "description": "Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" }, |
+ { "name": "request", "$ref": "Request" } |
+ ], |
+ "experimental": true |
+ }, |
+ { |
+ "name": "interceptedRedirect", |
+ "description": "Details of an intercepted HTTP redirect, which must be either allowed, blocked, modified or mocked.", |
+ "parameters": [ |
+ { "name": "interceptId", "$ref": "InterceptId" }, |
dgozman
2017/05/22 22:27:04
Is this the same id as original request? Would it
alex clarke (OOO till 29th)
2017/05/23 15:46:56
I've merged them but not tried to generate a new i
|
+ { "name": "responseHeaders", "$ref": "Headers", "description": "HTTP response headers." }, |
+ { "name": "responseStatusCode", "type": "integer", "description": "HTTP response code."}, |
+ { "name": "redirectUrl", "type": "string" } |
+ ], |
+ "experimental": true |
} |
] |
}, |