Interface RestResponse<T>


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

    • create

      @JsOverlay static <T> RestResponse<T> create()
    • getConfig

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

      @JsProperty T getData()
      Response payload.
    • getHeaders

      @JsProperty RestResponse.HeadersCallback getHeaders()
      Lazy response header reader.
    • getSource

      @JsProperty String getSource()
      Backend that produced the response.
    • 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.
    • isStale

      @JsProperty boolean isStale()
      Whether the returned cached value may be older than the remote source.
    • setConfig

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

      @JsProperty void setData(T data)
      Response payload.
    • setHeaders

      @JsProperty void setHeaders(RestResponse.HeadersCallback headers)
      Lazy response header reader.
    • setSource

      @JsProperty void setSource(String source)
      Backend that produced the response.
    • setStale

      @JsProperty void setStale(boolean stale)
      Whether the returned cached value may be older than the remote source.
    • 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.