Interface HTTPRequest
-
- All Implemented Interfaces:
public interface HTTPRequest
An HTTP request.
-
-
Method Summary
Modifier and Type Method Description abstract String
getMethod()
The method for the URL request, one of:"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" abstract URL
getUrl()
The URL to perform the request to. abstract Map<String, String>
getHeaders()
The request headers to be used during the request. abstract ByteArray
getBody()
The request body to be used during a POST or PUT request. abstract RequestType
getType()
The request's type. abstract RequestSubType
getSubType()
The request's subtype. abstract RequestMediaType
getMediaType()
The media's type. abstract ResponseType
getResponseType()
The expected type of the response body. abstract Integer
getConnectTimeout()
The connection timeout in milliseconds. abstract Integer
getReadTimeout()
The read timeout in milliseconds. -
-
Method Detail
-
getMethod
abstract String getMethod()
The method for the URL request, one of:
"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"
-
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.
-
getType
abstract RequestType getType()
The request's type.
-
getSubType
abstract RequestSubType getSubType()
The request's subtype.
-
getMediaType
abstract RequestMediaType getMediaType()
The media's type.
-
getResponseType
abstract ResponseType getResponseType()
The expected type of the response body.
-
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.
-
-
-
-