Interface InterceptableHTTPResponse

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onChunk(ChunkInterceptor chunkInterceptor) Provides ByteArray chunks of the response body as they are read from the HTTP connection.
      abstract Unit onBody(BodyInterceptor bodyInterceptor) Provides the response body from the HTTP connection after passing through the onChunk.
      abstract URL getUrl() The mutable URL which was used to do the request to.
      abstract Unit setUrl(URL url) The mutable URL which was used to do the request to.
      abstract Map<String, String> getHeaders() The mutable response headers received from the request.
      abstract Unit setHeaders(Map<String, String> headers) The mutable response headers received from the request.
      abstract Integer getStatus() The mutable status code from the HTTP response message received from the request.
      abstract Unit setStatus(Integer status) The mutable status code from the HTTP response message received from the request.
      abstract String getStatusText() The mutable HTTP response message, if any, returned from a server.
      abstract Unit setStatusText(String statusText) The mutable HTTP response message, if any, returned from a server.
      • Methods inherited from class com.theoplayer.android.api.network.http.HTTPResponse

        getRequest
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onChunk

         abstract Unit onChunk(ChunkInterceptor chunkInterceptor)

        Provides ByteArray chunks of the response body as they are read from the HTTP connection.

        Modifying the provided ByteArray or returning a new one will result to changes in the final body received in onBody.

      • onBody

         abstract Unit onBody(BodyInterceptor bodyInterceptor)

        Provides the response body from the HTTP connection after passing through the onChunk.

        Modifying the provided ByteArray or returning a new one will result to changes in the behavior of the player.

      • getUrl

         abstract URL getUrl()

        The mutable URL which was used to do the request to.

        Note that, in case of redirects it can be different from the original request URL.

      • setUrl

         abstract Unit setUrl(URL url)

        The mutable 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

         abstract Map<String, String> getHeaders()

        The mutable response headers received from the request.

        In case of multiple values per key, the values are comma separated.

        Adding or overriding headers can be done by:

        headers"newKey" = "newValue"

      • setHeaders

         abstract Unit setHeaders(Map<String, String> headers)

        The mutable response headers received from the request.

        In case of multiple values per key, the values are comma separated.

        Adding or overriding headers can be done by:

        headers"newKey" = "newValue"

      • getStatus

         abstract Integer getStatus()

        The mutable status code from the HTTP response message received from the request.

        From responses like HTTP/1.0 200 OK, extracts the number 200.

      • setStatus

         abstract Unit setStatus(Integer status)

        The mutable status code from the HTTP response message received from the request.

        From responses like HTTP/1.0 200 OK, extracts the number 200.

      • getStatusText

         abstract String getStatusText()

        The mutable 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).

      • setStatusText

         abstract Unit setStatusText(String statusText)

        The mutable 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).