Package org.angular.ts.ng
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTypeScript callback contract for this property. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RestResponse<T> create()Request configuration that produced this response.getData()Response payload.Lazy response header reader.Backend that produced the response.doubleNumeric HTTP status code.Native status text such as `OK` or `Not Found`.Transport completion status.booleanisStale()Whether the returned cached value may be older than the remote source.voidsetConfig(HttpRequestConfig config) Request configuration that produced this response.voidResponse payload.voidsetHeaders(RestResponse.HeadersCallback headers) Lazy response header reader.voidBackend that produced the response.voidsetStale(boolean stale) Whether the returned cached value may be older than the remote source.voidsetStatus(double status) Numeric HTTP status code.voidsetStatusText(String statusText) Native status text such as `OK` or `Not Found`.voidsetXhrStatus(String xhrStatus) Transport completion status.
-
Method Details
-
create
-
getConfig
Request configuration that produced this response. -
getData
Response payload. -
getHeaders
Lazy response header reader. -
getSource
Backend that produced the response. -
getStatus
@JsProperty double getStatus()Numeric HTTP status code. Non-2xx statuses reject the promise. -
getStatusText
Native status text such as `OK` or `Not Found`. -
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
Request configuration that produced this response. -
setData
Response payload. -
setHeaders
Lazy response header reader. -
setSource
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
Native status text such as `OK` or `Not Found`. -
setXhrStatus
Transport completion status. Useful for distinguishing timeout, abort, and network errors.
-