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

Unified Diff: chrome/common/extensions/api/web_request.json

Issue 10694055: Add read-only access to POST data for webRequest's onBeforeRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased + some corrections Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/web_request.json
diff --git a/chrome/common/extensions/api/web_request.json b/chrome/common/extensions/api/web_request.json
index af94afe869f5b54bae7412ffbe85889105e7099c..6d0d3c98d9891038023e8cfe51adb87029c10dbd 100644
--- a/chrome/common/extensions/api/web_request.json
+++ b/chrome/common/extensions/api/web_request.json
@@ -106,6 +106,25 @@
"method": {"type": "string", "description": "Standard HTTP method."},
"frameId": {"type": "integer", "description": "The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>), <code>frameId</code> indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab."},
"parentFrameId": {"type": "integer", "description": "ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists."},
+ "body": {
Matt Perry 2012/08/06 21:06:45 I think we should go with requestBody, because it'
vabr (Chromium) 2012/08/10 17:12:55 Done, changed both the entry name from 'details',
+ "type": "object",
+ "optional": true,
+ "description": "Experimental feature, only available in DEV or CANARY channels. Container for request body data. Only provided if extraInfoSpec contains 'body'.",
+ "properties": {
+ "error": {"type": "string", "optional": true, "description": "Errors when obtaining request body data."},
Aaron Boodman 2012/08/06 03:56:49 This is a bit abnormal for our APIs. What types of
vabr (Chromium) 2012/08/10 17:12:55 Right now the only errors can be chunked elements
Aaron Boodman 2012/08/10 21:47:12 I see. Makes sense.
+ "parsedForm": {
Aaron Boodman 2012/08/06 03:56:49 How about 'formData'?
vabr (Chromium) 2012/08/10 17:12:55 I have no preference on parsedForm vs. formData, b
+ "type": "object",
+ "optional": true,
+ "description": "If the request method is POST and the body is a sequence of key-value pairs, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. It is also not present if the form upload is chunked. Example value of this dictionary is {'key': ['value1', 'value2']}.",
+ "properties": {},
+ "additionalProperties": {
+ "type": "array",
+ "items": { "type": "string" }
+ }
+ },
+ "raw" : {"type": "string", "optional": true, "description": "If the request method is PUT or POST then the unparsed request body is contained here, unless it already is parsed in parsedForm or some error occurred. Files from the request body are replaced by filenames."}
+ }
+ },
"tabId": {"type": "integer", "description": "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab."},
"type": {"type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description": "How the requested resource will be used."},
"timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
@@ -125,7 +144,7 @@
"description": "Array of extra information that should be passed to the listener function.",
"items": {
"type": "string",
- "enum": ["blocking"]
+ "enum": ["blocking", "body"]
}
}
],

Powered by Google App Engine
This is Rietveld 408576698