Interface HttpRequestOptions


@JsType(isNative=true, name="ng.HttpRequestOptions", namespace="<global>") public interface HttpRequestOptions
Request options shared by the `$http` shortcut methods. See http://docs.angularjs.org/api/ng/service/$http#usage
  • Method Details

    • create

      @JsOverlay static HttpRequestOptions create()
    • getCache

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

      @JsProperty Object getData()
      Request body. Shorthand methods with explicit data set this automatically.
    • getHeaders

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

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

      @JsProperty jsinterop.base.JsPropertyMap<Object> getParams()
      Query parameters appended to the request URL.
    • getResponseType

      @JsProperty String getResponseType()
      Native fetch response body reader hint.
    • getTimeout

      @JsProperty HttpRequestOptions.GetTimeoutUnionType getTimeout()
      Millisecond timeout, or a promise whose resolution aborts the request.
    • 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.
    • setData

      @JsProperty void setData(Object data)
      Request body. Shorthand methods with explicit data set this automatically.
    • 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.
    • setParams

      @JsProperty void setParams(jsinterop.base.JsPropertyMap<Object> params)
      Query parameters appended to the request URL.
    • setResponseType

      @JsProperty void setResponseType(String responseType)
      Native fetch response body reader hint.
    • setTimeout

      @JsProperty void setTimeout(HttpRequestOptions.GetTimeoutUnionType timeout)
      Millisecond timeout, or a promise whose resolution aborts the request.
    • setTimeout

      @JsOverlay default void setTimeout(elemental2.promise.Promise<Object> timeout)
    • setTimeout

      @JsOverlay default void setTimeout(double timeout)
    • 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.