public interface AsyncHttpClient
Modifier and Type | Method and Description |
---|---|
default <T> java.util.concurrent.CompletionStage<T> |
get(java.net.URI uri,
JsonParser<T> parser)
Send a GET request and parse the result into object of given type.
|
<T> java.util.concurrent.CompletionStage<T> |
get(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> headers,
JsonParser<T> parser)
Send a GET request and parse the result into object of given type.
|
<T> java.util.concurrent.CompletionStage<T> |
post(java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> headers,
java.lang.String data,
JsonParser<T> parser)
Send a POST request and parse the result into object of given type.
|
default <T> java.util.concurrent.CompletionStage<T> |
post(java.net.URI uri,
java.lang.String data,
JsonParser<T> parser)
Send a POST request and parse the result into object of given type.
|
<T> java.util.concurrent.CompletionStage<T> get(java.net.URI uri, java.util.Map<java.lang.String,java.lang.String> headers, JsonParser<T> parser)
T
- return type the response json will be parsed intoheaders
- headers to pass to the requestparser
- parser to use for the response jsonuri
- uri to make the http request todefault <T> java.util.concurrent.CompletionStage<T> get(java.net.URI uri, JsonParser<T> parser)
T
- return type the response json will be parsed intouri
- uri to make the http request toparser
- parser to use for the response json<T> java.util.concurrent.CompletionStage<T> post(java.net.URI uri, java.util.Map<java.lang.String,java.lang.String> headers, java.lang.String data, JsonParser<T> parser)
T
- return type the response json will be parsed intodata
- the data to send (in JSON format)headers
- headers to pass to the requesturi
- uri to make the http request toparser
- parser to use for the response jsondefault <T> java.util.concurrent.CompletionStage<T> post(java.net.URI uri, java.lang.String data, JsonParser<T> parser)
T
- return type the response json will be parsed intodata
- the data to send (in JSON format)uri
- uri to make the http request toparser
- parser to use for the response json