Package org.angular.ts.ng
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 Summary
Modifier and TypeMethodDescriptionRequest configuration that produced this response.getData()Parsed response body.doubleNumeric HTTP status code.Native status text such as `OK` or `Not Found`.Transport completion status.jsinterop.base.JsPropertyMap<String> headers()Lazy response header reader.voidsetConfig(HttpRequestConfig config) Request configuration that produced this response.voidParsed response body.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
-
getConfig
Request configuration that produced this response. -
getData
Parsed response body. -
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. -
headers
jsinterop.base.JsPropertyMap<String> headers()Lazy response header reader.- Returns:
- Method result.
-
setConfig
Request configuration that produced this response. -
setData
Parsed response body. -
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.
-