public interface HttpConnection<T>
Modifier and Type | Interface and Description |
---|---|
static class |
HttpConnection.HttpMethod
HTTP Methods for the request
|
static class |
HttpConnection.RequestField
HTTP headers for the request
|
Modifier and Type | Method and Description |
---|---|
default <V> HttpConnection<T> |
addRequestField(HttpConnection.RequestField field,
V value)
Add header to http request
|
<V> HttpConnection<T> |
addRequestField(java.lang.String field,
V value)
Add header to http request
|
default HttpConnection<T> |
addRequestFields(HeaderMap map)
Add headers to http request
|
HttpConnection<T> |
addRequestFields(java.util.Map<java.lang.String,java.lang.Object> map)
Add headers to http request
|
HttpDeleteRequest |
createDeleteRequest()
Performs a delete request
|
HttpGetRequest<T> |
createGetRequest()
Performs a get request
|
HttpInputRequest<T> |
createPatchRequest()
Performs a patch request
|
HttpInputRequest<T> |
createPostRequest()
Performs a post request
|
HttpInputRequest<T> |
createPutRequest()
Performs a put request
|
default <V> HttpConnection<T> addRequestField(HttpConnection.RequestField field, V value)
field
- Field that will be added in the headers of the requestvalue
- Value of the field, this will be serialized to string<V> HttpConnection<T> addRequestField(java.lang.String field, V value)
field
- Field that will be added in the headers of the requestvalue
- Value of the field, this will be serialized to stringdefault HttpConnection<T> addRequestFields(HeaderMap map)
map
- Map containing all fields and values, the values will be serialized to stringHttpConnection<T> addRequestFields(java.util.Map<java.lang.String,java.lang.Object> map)
map
- Map containing all fields and values, the values will be serialized to stringHttpGetRequest<T> createGetRequest()
HttpInputRequest<T> createPostRequest()
HttpInputRequest<T> createPatchRequest()
HttpInputRequest<T> createPutRequest()
HttpDeleteRequest createDeleteRequest()