Interface InterceptableHTTPRequest

    • 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 respondWith(CompleteHTTPResponse response) Immediately respond with the provided response.
      abstract String getMethod() The mutable method for the URL request, one of:"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"
      abstract Unit setMethod(String method) The mutable method for the URL request, one of:"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"
      abstract URL getUrl() The mutable URL to perform the request to.
      abstract Unit setUrl(URL url) The mutable URL to perform the request to.
      abstract Map<String, String> getHeaders() The mutable request headers to be used during the request.
      abstract Unit setHeaders(Map<String, String> headers) The mutable request headers to be used during the request.
      abstract ByteArray getBody() The mutable request body to be used during a POST or PUT request.
      abstract Unit setBody(ByteArray body) The mutable request body to be used during a POST or PUT request.
      abstract Integer getConnectTimeout() The connection timeout in milliseconds.
      abstract Unit setConnectTimeout(Integer connectTimeout) The connection timeout in milliseconds.
      abstract Integer getReadTimeout() The read timeout in milliseconds.
      abstract Unit setReadTimeout(Integer readTimeout) The read timeout in milliseconds.
      • Methods inherited from class com.theoplayer.android.api.network.http.HTTPRequest

        getMediaType, getResponseType, getSubType, getType
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getMethod

         abstract String getMethod()

        The mutable method for the URL request, one of:

        "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"

      • setMethod

         abstract Unit setMethod(String method)

        The mutable method for the URL request, one of:

        "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"

      • getUrl

         abstract URL getUrl()

        The mutable URL to perform the request to.

      • setUrl

         abstract Unit setUrl(URL url)

        The mutable URL to perform the request to.

      • getHeaders

         abstract Map<String, String> getHeaders()

        The mutable request headers to be used during 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 request headers to be used during 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"

      • getBody

         abstract ByteArray getBody()

        The mutable request body to be used during a POST or PUT request.

      • setBody

         abstract Unit setBody(ByteArray body)

        The mutable request body to be used during a POST or PUT request.

      • getConnectTimeout

         abstract Integer getConnectTimeout()

        The connection timeout in milliseconds. This timeout is used when establishing a connection to a remote server. If the connection cannot be established within this timeout period, a connection timeout error will be thrown.

      • setConnectTimeout

         abstract Unit setConnectTimeout(Integer connectTimeout)

        The connection timeout in milliseconds. This timeout is used when establishing a connection to a remote server. If the connection cannot be established within this timeout period, a connection timeout error will be thrown.

      • getReadTimeout

         abstract Integer getReadTimeout()

        The read timeout in milliseconds. This timeout is used when reading data from an established connection with a remote server. If no data is received within this timeout period, a read timeout error will be thrown.

      • setReadTimeout

         abstract Unit setReadTimeout(Integer readTimeout)

        The read timeout in milliseconds. This timeout is used when reading data from an established connection with a remote server. If no data is received within this timeout period, a read timeout error will be thrown.