Dart Documentationangular.core.domHttpDefaults

HttpDefaults class

Injected into the Http service. This class contains application-wide HTTP defaults.

The default implementation provides headers which the Angular team believes to be useful.

class HttpDefaults {
 /**
  * The [HttpDefaultHeaders] object used by [Http] to add default headers
  * to requests.
  */
 HttpDefaultHeaders headers;

 /**
  * The default cache.  To enable caching application-wide, instantiate with a
  * [Cache] object.
  */
 var cache;

 /**
  * Constructor intended for DI.
  */
 HttpDefaults(HttpDefaultHeaders this.headers);
}

Constructors

new HttpDefaults(HttpDefaultHeaders headers) #

Constructor intended for DI.

HttpDefaults(HttpDefaultHeaders this.headers);

Properties

var cache #

The default cache. To enable caching application-wide, instantiate with a Cache object.

var cache

HttpDefaultHeaders headers #

The HttpDefaultHeaders object used by Http to add default headers to requests.

HttpDefaultHeaders headers