Interface HttpDefaults


@JsType(isNative=true, name="ng.HttpDefaults", namespace="<global>") public interface HttpDefaults
Default request settings configured through `app.config({ $http })` and exposed at runtime through `$http.defaults`. Not every `HttpRequestOptions` field is supported here; this shape only includes the fields that the runtime reads from provider-level defaults. https://docs.angularjs.org/api/ng/service/$http#defaults https://docs.angularjs.org/api/ng/service/$http#usage
  • Method Details

    • create

      @JsOverlay static HttpDefaults create()
    • getCache

      @JsProperty Object getCache()
      Cache used for cacheable requests. `true` enables the default cache.
    • getHeaders

      @JsProperty jsinterop.base.JsPropertyMap<Object> getHeaders()
      Default headers merged into each request.
    • getParamSerializer

      @JsProperty Object getParamSerializer()
      Query parameter serializer token or function.
    • getTransformRequest

      @JsProperty Object getTransformRequest()
      Request body transform pipeline.
    • getTransformResponse

      @JsProperty Object getTransformResponse()
      Response body transform pipeline.
    • getXsrfCookieName

      @JsProperty String getXsrfCookieName()
      Cookie name used when reading the XSRF token.
    • getXsrfHeaderName

      @JsProperty String getXsrfHeaderName()
      Header name used when sending the XSRF token.
    • isWithCredentials

      @JsProperty boolean isWithCredentials()
      Whether cross-site requests should include credentials by default.
    • setCache

      @JsProperty void setCache(Object cache)
      Cache used for cacheable requests. `true` enables the default cache.
    • setHeaders

      @JsProperty void setHeaders(jsinterop.base.JsPropertyMap<Object> headers)
      Default headers merged into each request.
    • setParamSerializer

      @JsProperty void setParamSerializer(Object paramSerializer)
      Query parameter serializer token or function.
    • setTransformRequest

      @JsProperty void setTransformRequest(Object transformRequest)
      Request body transform pipeline.
    • setTransformResponse

      @JsProperty void setTransformResponse(Object transformResponse)
      Response body transform pipeline.
    • setWithCredentials

      @JsProperty void setWithCredentials(boolean withCredentials)
      Whether cross-site requests should include credentials by default.
    • setXsrfCookieName

      @JsProperty void setXsrfCookieName(String xsrfCookieName)
      Cookie name used when reading the XSRF token.
    • setXsrfHeaderName

      @JsProperty void setXsrfHeaderName(String xsrfHeaderName)
      Header name used when sending the XSRF token.