Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/inspector/browser_protocol.json

Issue 2739323003: DevTools protocol interception, blocking & modification of requests (Closed)
Patch Set: Address remaining TODOs Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 { 1 {
2 "version": { "major": "1", "minor": "2" }, 2 "version": { "major": "1", "minor": "2" },
3 "domains": [{ 3 "domains": [{
4 "domain": "Inspector", 4 "domain": "Inspector",
5 "experimental": true, 5 "experimental": true,
6 "types": [], 6 "types": [],
7 "commands": [ 7 "commands": [
8 { 8 {
9 "name": "enable", 9 "name": "enable",
10 "description": "Enables inspector domain notifications." 10 "description": "Enables inspector domain notifications."
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 "id": "LoaderId", 1105 "id": "LoaderId",
1106 "type": "string", 1106 "type": "string",
1107 "description": "Unique loader identifier." 1107 "description": "Unique loader identifier."
1108 }, 1108 },
1109 { 1109 {
1110 "id": "RequestId", 1110 "id": "RequestId",
1111 "type": "string", 1111 "type": "string",
1112 "description": "Unique request identifier." 1112 "description": "Unique request identifier."
1113 }, 1113 },
1114 { 1114 {
1115 "id": "InterceptionId",
1116 "type": "string",
1117 "description": "Unique intercepted request identifier."
1118 },
1119 {
1120 "id": "ErrorReason",
1121 "type": "string",
1122 "enum": ["Failed", "Aborted", "TimedOut", "AccessDenied", "Conne ctionClosed", "ConnectionReset", "ConnectionRefused", "ConnectionAborted", "Conn ectionFailed", "NameNotResolved", "InternetDisconnected", "AddressUnreachable"],
1123 "description": "Network level fetch failure reason."
1124 },
1125 {
1115 "id": "Timestamp", 1126 "id": "Timestamp",
1116 "type": "number", 1127 "type": "number",
1117 "description": "Number of seconds since epoch." 1128 "description": "Number of seconds since epoch."
1118 }, 1129 },
1119 { 1130 {
1120 "id": "Headers", 1131 "id": "Headers",
1121 "type": "object", 1132 "type": "object",
1122 "description": "Request / response headers as keys / values of J SON object." 1133 "description": "Request / response headers as keys / values of J SON object."
1123 }, 1134 },
1124 { 1135 {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 { 1499 {
1489 "name": "getCertificate", 1500 "name": "getCertificate",
1490 "description": "Returns the DER-encoded certificate.", 1501 "description": "Returns the DER-encoded certificate.",
1491 "parameters": [ 1502 "parameters": [
1492 { "name": "origin", "type": "string", "description": "Origin to get certificate for." } 1503 { "name": "origin", "type": "string", "description": "Origin to get certificate for." }
1493 ], 1504 ],
1494 "returns": [ 1505 "returns": [
1495 { "name": "tableNames", "type": "array", "items": { "type": "string" } } 1506 { "name": "tableNames", "type": "array", "items": { "type": "string" } }
1496 ], 1507 ],
1497 "experimental": true 1508 "experimental": true
1509 },
1510 {
1511 "name": "enableFetchInterception",
dgozman 2017/05/25 21:29:36 Sorry for bikeshedding, but let's normalize the na
alex clarke (OOO till 29th) 2017/05/26 19:37:03 Done.
1512 "parameters": [
1513 { "name": "enabled", "type": "boolean", "description": "Whet her or not HTTP requests should be intercepted and Network.requestIntercepted ev ents sent." }
1514 ],
1515 "experimental": true
1516 },
1517 {
1518 "name": "continueRequest",
1519 "description": "Response to Network.requestIntercepted which eit her modifies the request to continue with any modifications, or blocks it, or co mpletes it with the provided response bytes.",
1520 "parameters": [
1521 { "name": "interceptionId", "$ref": "InterceptionId" },
1522 { "name": "errorReason", "$ref": "ErrorReason", "optional": true, "description": "If set this causes the request to fail with the given reas on." },
1523 { "name": "rawResponse", "type": "string", "optional": true, "description": "Id set this makes the request complete with the provided base64 encoded mock response." },
dgozman 2017/05/25 21:29:36 - typo: Id set - nit: remove "mock" - Let's mentio
alex clarke (OOO till 29th) 2017/05/26 19:37:03 I can see that might be useful. Let do that in a
1524 { "name": "url", "type": "string", "optional": true, "descri ption": "If set the request url will be modified in a way that's not directly vi sible to blink." },
dgozman 2017/05/25 21:29:36 not observable by page
alex clarke (OOO till 29th) 2017/05/26 19:37:03 Done.
1525 { "name": "method", "type": "string", "optional": true, "des cription": "If set this allows the request method to be overridden."},
1526 { "name": "postData", "type": "string", "optional": true, "d escription": "If set this allows postData to be set."},
1527 { "name": "headers", "$ref": "Headers", "optional": true, "d escription": "If set this allows the request headers to be changed."}
1528 ],
1529 "experimental": true
1498 } 1530 }
1499 ], 1531 ],
1500 "events": [ 1532 "events": [
1501 { 1533 {
1502 "name": "resourceChangedPriority", 1534 "name": "resourceChangedPriority",
1503 "description": "Fired when resource loading priority is changed" , 1535 "description": "Fired when resource loading priority is changed" ,
1504 "parameters": [ 1536 "parameters": [
1505 { "name": "requestId", "$ref": "RequestId", "description": " Request identifier." }, 1537 { "name": "requestId", "$ref": "RequestId", "description": " Request identifier." },
1506 { "name": "newPriority", "$ref": "ResourcePriority", "descri ption": "New priority" }, 1538 { "name": "newPriority", "$ref": "ResourcePriority", "descri ption": "New priority" },
1507 { "name": "timestamp", "$ref": "Timestamp", "description": " Timestamp." } 1539 { "name": "timestamp", "$ref": "Timestamp", "description": " Timestamp." }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 "name": "eventSourceMessageReceived", 1680 "name": "eventSourceMessageReceived",
1649 "description": "Fired when EventSource message is received.", 1681 "description": "Fired when EventSource message is received.",
1650 "parameters": [ 1682 "parameters": [
1651 { "name": "requestId", "$ref": "RequestId", "description": " Request identifier." }, 1683 { "name": "requestId", "$ref": "RequestId", "description": " Request identifier." },
1652 { "name": "timestamp", "$ref": "Timestamp", "description": " Timestamp." }, 1684 { "name": "timestamp", "$ref": "Timestamp", "description": " Timestamp." },
1653 { "name": "eventName", "type": "string", "description": "Mes sage type." }, 1685 { "name": "eventName", "type": "string", "description": "Mes sage type." },
1654 { "name": "eventId", "type": "string", "description": "Messa ge identifier." }, 1686 { "name": "eventId", "type": "string", "description": "Messa ge identifier." },
1655 { "name": "data", "type": "string", "description": "Message content." } 1687 { "name": "data", "type": "string", "description": "Message content." }
1656 ], 1688 ],
1657 "experimental": true 1689 "experimental": true
1690 },
1691 {
1692 "name": "requestIntercepted",
1693 "description": "Details of an intercepted HTTP request, which mu st be either allowed, blocked, modified or mocked.",
dgozman 2017/05/25 21:29:36 Let's mention that redirected request gets additio
alex clarke (OOO till 29th) 2017/05/26 19:37:03 Done.
1694 "parameters": [
1695 { "name": "InterceptionId", "$ref": "InterceptionId" },
1696 { "name": "request", "$ref": "Request" },
1697 { "name": "redirectHeaders", "$ref": "Headers", "optional": true, "description": "HTTP response headers." },
1698 { "name": "redirectStatusCode", "type": "integer", "optional ": true, "description": "HTTP response code."},
1699 { "name": "redirectUrl", "optional": true, "type": "string"}
1700 ],
1701 "experimental": true
1658 } 1702 }
1659 ] 1703 ]
1660 }, 1704 },
1661 { 1705 {
1662 "domain": "Database", 1706 "domain": "Database",
1663 "experimental": true, 1707 "experimental": true,
1664 "types": [ 1708 "types": [
1665 { 1709 {
1666 "id": "DatabaseId", 1710 "id": "DatabaseId",
1667 "type": "string", 1711 "type": "string",
(...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after
4673 "parameters": [ 4717 "parameters": [
4674 { "name": "windowId", "$ref": "WindowID", "description": "Br owser window id." } 4718 { "name": "windowId", "$ref": "WindowID", "description": "Br owser window id." }
4675 ], 4719 ],
4676 "returns": [ 4720 "returns": [
4677 { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored windo w position and size are returned." } 4721 { "name": "bounds", "$ref": "Bounds", "description": "Bounds information of the window. When window state is 'minimized', the restored windo w position and size are returned." }
4678 ] 4722 ]
4679 } 4723 }
4680 ] 4724 ]
4681 }] 4725 }]
4682 } 4726 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698