Dart Documentationchrome.declarativeWebRequestSetRequestHeader

SetRequestHeader class

Sets the request header of the specified name to the specified value. If a header with the specified name did not exist before, a new one is created. Header name comparison is always case-insensitive. Each request header name occurs only once in each request.

class SetRequestHeader extends ChromeObject {
 SetRequestHeader({String name, String value}) {
   if (name != null) this.name = name;
   if (value != null) this.value = value;
 }
 SetRequestHeader.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * HTTP request header name.
  */
 String get name => jsProxy['name'];
 set name(String value) => jsProxy['name'] = value;

 /**
  * HTTP request header value.
  */
 String get value => jsProxy['value'];
 set value(String value) => jsProxy['value'] = value;
}

Extends

ChromeObject > SetRequestHeader

Constructors

new SetRequestHeader({String name, String value}) #

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

docs inherited from ChromeObject
SetRequestHeader({String name, String value}) {
 if (name != null) this.name = name;
 if (value != null) this.value = value;
}

new SetRequestHeader.fromProxy(JsObject jsProxy) #

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

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

Properties

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String name #

HTTP request header name.

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

String value #

HTTP request header value.

String get value => jsProxy['value'];
set value(String value) => jsProxy['value'] = 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();