Interface HTTPRequest

  • All Implemented Interfaces:

    
    public interface HTTPRequest
    
                        

    An HTTP request.

    • 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
    • Constructor Detail

    • Method Detail

      • getMethod

         abstract String getMethod()

        The method for the URL request, one of:

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

      • getUrl

         abstract URL getUrl()

        The URL to perform the request to.

      • getHeaders

         abstract Map<String, String> getHeaders()

        The request headers to be used during the request.

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

      • getBody

         abstract ByteArray getBody()

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

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