Interface HttpResponse<T>


@JsType(isNative=true, name="ng.HttpResponse", namespace="<global>") public interface HttpResponse<T>
Public AngularTS HttpResponse contract exposed through the global ng namespace for Closure-annotated applications.
  • Method Details

    • getConfig

      @JsProperty HttpRequestConfig getConfig()
      Request configuration that produced this response.
    • getData

      @JsProperty T getData()
      Parsed response body.
    • getStatus

      @JsProperty double getStatus()
      Numeric HTTP status code. Non-2xx statuses reject the promise.
    • getStatusText

      @JsProperty String getStatusText()
      Native status text such as `OK` or `Not Found`.
    • getXhrStatus

      @JsProperty String getXhrStatus()
      Transport completion status. Useful for distinguishing timeout, abort, and network errors.
    • headers

      jsinterop.base.JsPropertyMap<String> headers()
      Lazy response header reader.
      Returns:
      Method result.
    • setConfig

      @JsProperty void setConfig(HttpRequestConfig config)
      Request configuration that produced this response.
    • setData

      @JsProperty void setData(T data)
      Parsed response body.
    • setStatus

      @JsProperty void setStatus(double status)
      Numeric HTTP status code. Non-2xx statuses reject the promise.
    • setStatusText

      @JsProperty void setStatusText(String statusText)
      Native status text such as `OK` or `Not Found`.
    • setXhrStatus

      @JsProperty void setXhrStatus(String xhrStatus)
      Transport completion status. Useful for distinguishing timeout, abort, and network errors.