OLD | NEW |
---|---|
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 Loading... | |
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 "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',
| |
110 "type": "object", | |
111 "optional": true, | |
112 "description": "Experimental feature, only available in DEV or C ANARY channels. Container for request body data. Only provided if extraInfoSpec contains 'body'.", | |
113 "properties": { | |
114 "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.
| |
115 "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
| |
116 "type": "object", | |
117 "optional": true, | |
118 "description": "If the request method is POST and the body i s a sequence of key-value pairs, encoded as either multipart/form-data, or appli cation/x-www-form-urlencoded, this dictionary is present and for each key contai ns 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 th e form upload is chunked. Example value of this dictionary is {'key': ['value1', 'value2']}.", | |
119 "properties": {}, | |
120 "additionalProperties": { | |
121 "type": "array", | |
122 "items": { "type": "string" } | |
123 } | |
124 }, | |
125 "raw" : {"type": "string", "optional": true, "description": "I f 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 fr om the request body are replaced by filenames."} | |
126 } | |
127 }, | |
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." }, | 128 "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."}, | 129 "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."} | 130 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."} |
112 } | 131 } |
113 } | 132 } |
114 ], | 133 ], |
115 "extraParameters": [ | 134 "extraParameters": [ |
116 { | 135 { |
117 "$ref": "RequestFilter", | 136 "$ref": "RequestFilter", |
118 "name": "filter", | 137 "name": "filter", |
119 "description": "A set of filters that restricts the events that will be sent to this listener." | 138 "description": "A set of filters that restricts the events that will be sent to this listener." |
120 }, | 139 }, |
121 { | 140 { |
122 "type": "array", | 141 "type": "array", |
123 "optional": true, | 142 "optional": true, |
124 "name": "extraInfoSpec", | 143 "name": "extraInfoSpec", |
125 "description": "Array of extra information that should be passed to the listener function.", | 144 "description": "Array of extra information that should be passed to the listener function.", |
126 "items": { | 145 "items": { |
127 "type": "string", | 146 "type": "string", |
128 "enum": ["blocking"] | 147 "enum": ["blocking", "body"] |
129 } | 148 } |
130 } | 149 } |
131 ], | 150 ], |
132 "returns": { | 151 "returns": { |
133 "$ref": "BlockingResponse", | 152 "$ref": "BlockingResponse", |
134 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.", | 153 "description": "If \"blocking\" is specified in the \"extraInfoSpec\" parameter, the event listener should return an object of this type.", |
135 "optional": true | 154 "optional": true |
136 } | 155 } |
137 }, | 156 }, |
138 { | 157 { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 { | 496 { |
478 "$ref": "RequestFilter", | 497 "$ref": "RequestFilter", |
479 "name": "filter", | 498 "name": "filter", |
480 "description": "A set of filters that restricts the events that will be sent to this listener." | 499 "description": "A set of filters that restricts the events that will be sent to this listener." |
481 } | 500 } |
482 ] | 501 ] |
483 } | 502 } |
484 ] | 503 ] |
485 } | 504 } |
486 ] | 505 ] |
OLD | NEW |