Dart Documentationchrome.webRequestRequestBodyWebRequest

RequestBodyWebRequest class

class RequestBodyWebRequest extends ChromeObject {
 RequestBodyWebRequest({String error, Map formData, List<UploadData> raw}) {
   if (error != null) this.error = error;
   if (formData != null) this.formData = formData;
   if (raw != null) this.raw = raw;
 }
 RequestBodyWebRequest.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * Errors when obtaining request body data.
  */
 String get error => jsProxy['error'];
 set error(String value) => jsProxy['error'] = value;

 /**
  * If the request method is POST and the body is a sequence 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
  * 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. An
  * example value of this dictionary is {'key': ['value1', 'value2']}.
  */
 Map get formData => mapify(jsProxy['formData']);
 set formData(Map value) => jsProxy['formData'] = jsify(value);

 /**
  * If the request method is PUT or POST, and the body is not already parsed in
  * formData, then the unparsed request body elements are contained in this
  * array.
  */
 List<UploadData> get raw => listify(jsProxy['raw'], _createUploadData);
 set raw(List<UploadData> value) => jsProxy['raw'] = jsify(value);
}

Extends

ChromeObject > RequestBodyWebRequest

Constructors

new RequestBodyWebRequest({String error, Map formData, List<UploadData> raw}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
RequestBodyWebRequest({String error, Map formData, List<UploadData> raw}) {
 if (error != null) this.error = error;
 if (formData != null) this.formData = formData;
 if (raw != null) this.raw = raw;
}

new RequestBodyWebRequest.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
RequestBodyWebRequest.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

String error #

Errors when obtaining request body data.

String get error => jsProxy['error'];
set error(String value) => jsProxy['error'] = value;

Map formData #

If the request method is POST and the body is a sequence 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 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. An example value of this dictionary is {'key': 'value1', 'value2'}.

Map get formData => mapify(jsProxy['formData']);
set formData(Map value) => jsProxy['formData'] = jsify(value);

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

List<UploadData> raw #

If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array.

List<UploadData> get raw => listify(jsProxy['raw'], _createUploadData);
set raw(List<UploadData> value) => jsProxy['raw'] = jsify(value);

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();