Interface HTTPRequest
-
- All Implemented Interfaces:
public interface HTTPRequestAn HTTP request.
-
-
Method Summary
Modifier and Type Method Description abstract StringgetMethod()The method for the URL request, one of:"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" abstract URLgetUrl()The URL to perform the request to. abstract Map<String, String>getHeaders()The request headers to be used during the request. abstract ByteArraygetBody()The request body to be used during a POST or PUT request. abstract RequestTypegetType()The request's type. abstract RequestSubTypegetSubType()The request's subtype. abstract RequestMediaTypegetMediaType()The media's type. abstract ResponseTypegetResponseType()The expected type of the response body. abstract IntegergetConnectTimeout()The connection timeout in milliseconds. abstract IntegergetReadTimeout()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.
-
-
-
-