| java.lang.Object | |
| ↳ | com.google.firebase.IncomingHttpResponse |
Contains information that describes an HTTP response received by the SDK.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
IncomingHttpResponse(HttpResponse response, String content)
Creates an
IncomingHttpResponse from a successful response and the content read
from it. | |||||||||||
|
IncomingHttpResponse(HttpResponseException e, HttpRequest request)
Creates an
IncomingHttpResponse from an HTTP error response. | |||||||||||
|
IncomingHttpResponse(HttpResponseException e, OutgoingHttpRequest request)
Creates an
IncomingHttpResponse from an HTTP error response. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String |
getContent()
Returns the content of the response as a string.
| ||||||||||
| Map<String, Object> |
getHeaders()
Returns the headers set on the response.
| ||||||||||
| OutgoingHttpRequest |
getRequest()
Returns the request that resulted in this response.
| ||||||||||
| int |
getStatusCode()
Returns the status code of the response.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates an IncomingHttpResponse from a successful response and the content read
from it. The caller is expected to read the content from the response, and handle any errors
that may occur while reading.
| response | A successful response. |
|---|---|
| content | Content read from the response. |
Creates an IncomingHttpResponse from an HTTP error response.
| e | The exception representing the HTTP error response. |
|---|---|
| request | The request that resulted in the error. |
Creates an IncomingHttpResponse from an HTTP error response.
| e | The exception representing the HTTP error response. |
|---|---|
| request | The request that resulted in the error. |
Returns the content of the response as a string.
Returns the headers set on the response.
Returns the request that resulted in this response.
Returns the status code of the response.