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.

    • Method Detail

      • 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).

      • getBody

         final ByteArray getBody()

        The response body received from the request.