Class CompleteHTTPResponse
-
- All Implemented Interfaces:
-
com.theoplayer.android.api.network.http.HTTPResponse
public final class CompleteHTTPResponse implements HTTPResponse
A complete HTTP response, with a full response body.
-
-
Constructor Summary
Constructors Constructor Description CompleteHTTPResponse(HTTPRequest request, URL url, Map<String, String> headers, Integer status, String statusText, ByteArray body)
-
Method Summary
Modifier and Type Method Description HTTPRequest
getRequest()
The HTTPRequest of this response. URL
getUrl()
The URL which was used to do the request to. Map<String, String>
getHeaders()
The response headers received from the request. Integer
getStatus()
The status code from the HTTP response message received from the request. String
getStatusText()
The HTTP response message, if any, returned from a server. final ByteArray
getBody()
The response body received from the request. -
-
Method Detail
-
getRequest
HTTPRequest getRequest()
The HTTPRequest of this response.
-
getUrl
URL getUrl()
The URL which was used to do the request to.
Note that, in case of redirects it can be different from the original request URL.
-
getHeaders
Map<String, String> getHeaders()
The response headers received from the request.
In case of multiple values per key, the values are comma separated.
-
getStatus
Integer getStatus()
The status code from the HTTP response message received from the request.
From responses like HTTP/1.0 200 OK, extracts the number 200.
-
getStatusText
String getStatusText()
The HTTP response message, if any, returned from a server.
From responses like HTTP/1.0 200 OK, extracts the Strings "OK".
Returns null if none could be discerned from the responses (the result was not valid HTTP).
-
-
-
-