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

Side by Side Diff: chrome/common/extensions/api/web_request.json

Issue 10948033: Explicitly naming the data type for requestBody (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "properties": { 8 "properties": {
9 "MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES": { 9 "MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES": {
10 "value": 20, 10 "value": 20,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 "optional": true, 97 "optional": true,
98 "description": "An ArrayBuffer with a copy of the data." 98 "description": "An ArrayBuffer with a copy of the data."
99 }, 99 },
100 "file": { 100 "file": {
101 "type": "string", 101 "type": "string",
102 "optional": true, 102 "optional": true,
103 "description": "A string with the file's path and name." 103 "description": "A string with the file's path and name."
104 } 104 }
105 }, 105 },
106 "description": "Contains data uploaded in a URL request." 106 "description": "Contains data uploaded in a URL request."
107 },
108 {
109 "id": "RequestBody",
110 "type": "object",
111 "description": "Contains the HTTP request body data.",
112 "properties": {
113 "error": {"type": "string", "optional": true, "description": "Errors w hen obtaining request body data."},
114 "formData": {
115 "type": "object",
116 "optional": true,
117 "description": "If the request method is POST and the body is a sequ ence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each ke y 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. An example value of this dictionary is {'key': ['value1', 'value2']}.",
118 "properties": {},
119 "additionalProperties": {
120 "type": "array",
121 "items": { "type": "string" }
122 }
123 },
124 "raw" : {
125 "type": "array",
126 "optional": true,
127 "items": {"$ref": "UploadData"},
128 "description": "If the request method is PUT or POST, and the body i s not already parsed in formData, then the unparsed request body elements are co ntained in this array."
129 }
130 }
107 } 131 }
108 ], 132 ],
109 "functions": [ 133 "functions": [
110 { 134 {
111 "name": "handlerBehaviorChanged", 135 "name": "handlerBehaviorChanged",
112 "type": "function", 136 "type": "function",
113 "description": "Needs to be called when the behavior of the webRequest h andlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often.", 137 "description": "Needs to be called when the behavior of the webRequest h andlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often.",
114 "parameters": [ 138 "parameters": [
115 {"type": "function", "name": "callback", "optional": true, "parameters ": []} 139 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
116 ] 140 ]
117 } 141 }
118 ], 142 ],
119 "events": [ 143 "events": [
120 { 144 {
121 "name": "onBeforeRequest", 145 "name": "onBeforeRequest",
122 "type": "function", 146 "type": "function",
123 "description": "Fired when a request is about to occur.", 147 "description": "Fired when a request is about to occur.",
124 "parameters": [ 148 "parameters": [
125 { 149 {
126 "type": "object", 150 "type": "object",
127 "name": "details", 151 "name": "details",
128 "properties": { 152 "properties": {
129 "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."}, 153 "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."},
130 "url": {"type": "string"}, 154 "url": {"type": "string"},
131 "method": {"type": "string", "description": "Standard HTTP method. "}, 155 "method": {"type": "string", "description": "Standard HTTP method. "},
132 "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."}, 156 "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."},
133 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "}, 157 "parentFrameId": {"type": "integer", "description": "ID of frame t hat wraps the frame which sent the request. Set to -1 if no parent frame exists. "},
134 "requestBody": { 158 "requestBody": {
135 "type": "object", 159 "$ref": "RequestBody",
136 "optional": true, 160 "optional": true,
137 "description": "Experimental feature, only available in DEV or C ANARY channels. Container for request body data. Only provided if extraInfoSpec contains 'requestBody'. Currently only request body elements containing byte dat a or files are reported.", 161 "description": "Contains the HTTP request body data. Experimenta l feature, only available in DEV or CANARY channels. Only provided if extraInfoS pec contains 'requestBody'."
138 "properties": {
139 "error": {"type": "string", "optional": true, "description": " Errors when obtaining request body data."},
140 "formData": {
141 "type": "object",
142 "optional": true,
143 "description": "If the request method is POST and the body i s a sequence of key-value pairs encoded in UTF8, encoded as either multipart/for m-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 anothe r media type, or if it is malformed, the dictionary is not present. An example v alue of this dictionary is {'key': ['value1', 'value2']}.",
144 "properties": {},
145 "additionalProperties": {
146 "type": "array",
147 "items": { "type": "string" }
148 }
149 },
150 "raw" : {
151 "type": "array",
152 "optional": true,
153 "items": {"$ref": "UploadData"},
154 "description": "If the request method is PUT or POST, and th e body is not already parsed in formData, then the unparsed request body element s are contained in this array."
155 }
156 }
157 }, 162 },
158 "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." }, 163 "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." },
159 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."}, 164 "type": {"type": "string", "enum": ["main_frame", "sub_frame", "st ylesheet", "script", "image", "object", "xmlhttprequest", "other"], "description ": "How the requested resource will be used."},
160 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."} 165 "timeStamp": {"type": "number", "description": "The time when this signal is triggered, in milliseconds since the epoch."}
161 } 166 }
162 } 167 }
163 ], 168 ],
164 "extraParameters": [ 169 "extraParameters": [
165 { 170 {
166 "$ref": "RequestFilter", 171 "$ref": "RequestFilter",
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 { 538 {
534 "$ref": "RequestFilter", 539 "$ref": "RequestFilter",
535 "name": "filter", 540 "name": "filter",
536 "description": "A set of filters that restricts the events that will be sent to this listener." 541 "description": "A set of filters that restricts the events that will be sent to this listener."
537 } 542 }
538 ] 543 ]
539 } 544 }
540 ] 545 ]
541 } 546 }
542 ] 547 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698