Dart Documentationchrome.devtoolsRequest

Request class

Represents a network request for a document resource (script, image and so on). See HAR Specification for reference.

class Request extends ChromeObject {
 Request();
 Request.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * Returns content of the response body.
  * 
  * Returns:
  * [content] Content of the response body (potentially encoded).
  * [encoding] Empty if content is not encoded, encoding name otherwise.
  * Currently, only base64 is supported.
  */
 Future<GetRequestContentResult> getContent() {
   var completer = new ChromeCompleter<GetRequestContentResult>.twoArgs(GetRequestContentResult._create);
   jsProxy.callMethod('getContent', [completer.callback]);
   return completer.future;
 }
}

Extends

ChromeObject > Request

Constructors

new Request() #

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

docs inherited from ChromeObject
Request();

new Request.fromProxy(JsObject jsProxy) #

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

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

Properties

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

Methods

Future<GetRequestContentResult> getContent() #

Returns content of the response body.

Returns: content Content of the response body (potentially encoded). encoding Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.

Future<GetRequestContentResult> getContent() {
 var completer = new ChromeCompleter<GetRequestContentResult>.twoArgs(GetRequestContentResult._create);
 jsProxy.callMethod('getContent', [completer.callback]);
 return completer.future;
}

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();