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

Side by Side 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: Adding an example value of formData to the docs Created 8 years, 5 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "webRequest", 7 "namespace": "webRequest",
8 "types": [ 8 "types": [
9 { 9 {
10 "id": "RequestFilter", 10 "id": "RequestFilter",
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 "parameters": [ 99 "parameters": [
100 { 100 {
101 "type": "object", 101 "type": "object",
102 "name": "details", 102 "name": "details",
103 "properties": { 103 "properties": {
104 "requestId": {"type": "string", "description": "The ID of the requ est. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."}, 104 "requestId": {"type": "string", "description": "The ID of the requ est. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."},
105 "url": {"type": "string"}, 105 "url": {"type": "string"},
106 "method": {"type": "string", "description": "Standard HTTP method. "}, 106 "method": {"type": "string", "description": "Standard HTTP method. "},
107 "frameId": {"type": "integer", "description": "The value 0 indicat es 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 f rame. Frame IDs are unique within a tab."}, 107 "frameId": {"type": "integer", "description": "The value 0 indicat es 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 f rame. Frame IDs are unique within a tab."},
108 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "}, 108 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
109 "experimentalPostData": {
Matt Perry 2012/07/23 21:19:01 Drop the "experimental" prefix. We're moving away
battre 2012/07/24 09:28:53 Don't you want to indicate to developers that this
Matt Perry 2012/07/24 20:46:57 The description indicates that. Also, the feature
vabr (Chromium) 2012/07/30 16:05:57 I removed the 'experimental' prefix based on the a
110 "type": "object",
111 "optional": true,
112 "description": "Experimental feature. Container for representati ons of data sent by the request via POST method. Only provided if extraInfoSpec contains requestPostData.",
113 "properties": {
114 "formData": {
115 "type": "object",
116 "optional": true,
117 "description": "If the POST data is a sequence of key-value pairs, either in 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 in another encoding, or if it was malformed, the dictionary is not present. It is also not present if the form upload was chunked. Example value of this dictionary is {'key': ['value1', 'value2']}.",
118 "properties": {},
119 "additionalProperties": {
120 "type": "array",
121 "items": { "type": "string" }
122 }
123 }
124 }
125 },
109 "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." }, 126 "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." },
110 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."}, 127 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
111 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."} 128 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
112 } 129 }
113 } 130 }
114 ], 131 ],
115 "extraParameters": [ 132 "extraParameters": [
116 { 133 {
117 "$ref": "RequestFilter", 134 "$ref": "RequestFilter",
118 "name": "filter", 135 "name": "filter",
119 "description": "A set of filters that restricts the events that will be sent to this listener." 136 "description": "A set of filters that restricts the events that will be sent to this listener."
120 }, 137 },
121 { 138 {
122 "type": "array", 139 "type": "array",
123 "optional": true, 140 "optional": true,
124 "name": "extraInfoSpec", 141 "name": "extraInfoSpec",
125 "description": "Array of extra information that should be passed to the listener function.", 142 "description": "Array of extra information that should be passed to the listener function.",
126 "items": { 143 "items": {
127 "type": "string", 144 "type": "string",
128 "enum": ["blocking"] 145 "enum": ["blocking", "requestPostData"]
Matt Perry 2012/07/23 21:19:01 imo "request" is unnecessary here. There's only 1
vabr (Chromium) 2012/07/30 16:05:57 Done.
129 } 146 }
130 } 147 }
131 ], 148 ],
132 "returns": { 149 "returns": {
133 "$ref": "BlockingResponse", 150 "$ref": "BlockingResponse",
134 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.", 151 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.",
135 "optional": true 152 "optional": true
136 } 153 }
137 }, 154 },
138 { 155 {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 { 494 {
478 "$ref": "RequestFilter", 495 "$ref": "RequestFilter",
479 "name": "filter", 496 "name": "filter",
480 "description": "A set of filters that restricts the events that will be sent to this listener." 497 "description": "A set of filters that restricts the events that will be sent to this listener."
481 } 498 }
482 ] 499 ]
483 } 500 }
484 ] 501 ]
485 } 502 }
486 ] 503 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698