public class HttpClient extends Object
| Constructor and Description |
|---|
HttpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(io.netty.handler.codec.http.cookie.Cookie c) |
void |
close() |
CompletableFuture<byte[]> |
doAsyncRequest(String url,
io.netty.handler.codec.http.HttpMethod httpMethod,
byte[] body,
AuthenticationToken authToken) |
CompletableFuture<byte[]> |
doAsyncRequest(String url,
io.netty.handler.codec.http.HttpMethod httpMethod,
byte[] body,
AuthenticationToken authToken,
io.netty.handler.codec.http.HttpHeaders extraHeaders) |
CompletableFuture<Void> |
doBulkReceiveRequest(String url,
io.netty.handler.codec.http.HttpMethod httpMethod,
byte[] body,
AuthenticationToken authToken,
BulkRestDataReceiver receiver)
Perform a request that potentially retrieves large amount of data.
|
CompletableFuture<Void> |
doBulkRequest(String url,
io.netty.handler.codec.http.HttpMethod httpMethod,
String body,
AuthenticationToken authToken,
BulkRestDataReceiver receiver) |
CompletableFuture<BulkRestDataSender> |
doBulkSendRequest(String url,
io.netty.handler.codec.http.HttpMethod httpMethod,
AuthenticationToken authToken) |
MediaType |
getAcceptMediaType() |
List<io.netty.handler.codec.http.cookie.Cookie> |
getCookies() |
MediaType |
getSendMediaType() |
void |
setAcceptMediaType(MediaType acceptMediaType) |
void |
setMaxResponseLength(int length)
Sets the maximum size of the responses - this is not applicable to bulk requests whose response is practically
unlimited and delivered piece by piece
|
void |
setSendMediaType(MediaType sendMediaType) |
public CompletableFuture<byte[]> doAsyncRequest(String url, io.netty.handler.codec.http.HttpMethod httpMethod, byte[] body, AuthenticationToken authToken) throws URISyntaxException
URISyntaxExceptionpublic CompletableFuture<byte[]> doAsyncRequest(String url, io.netty.handler.codec.http.HttpMethod httpMethod, byte[] body, AuthenticationToken authToken, io.netty.handler.codec.http.HttpHeaders extraHeaders) throws URISyntaxException
URISyntaxExceptionpublic CompletableFuture<BulkRestDataSender> doBulkSendRequest(String url, io.netty.handler.codec.http.HttpMethod httpMethod, AuthenticationToken authToken) throws URISyntaxException
URISyntaxExceptionpublic void setMaxResponseLength(int length)
length - public CompletableFuture<Void> doBulkReceiveRequest(String url, io.netty.handler.codec.http.HttpMethod httpMethod, byte[] body, AuthenticationToken authToken, BulkRestDataReceiver receiver) throws URISyntaxException
url - httpMethod - body - authToken - receiver - - send all the data to this receiver. To find out when the request has been finished, the Future has
to be usedURISyntaxExceptionpublic CompletableFuture<Void> doBulkRequest(String url, io.netty.handler.codec.http.HttpMethod httpMethod, String body, AuthenticationToken authToken, BulkRestDataReceiver receiver) throws URISyntaxException
URISyntaxExceptionpublic void addCookie(io.netty.handler.codec.http.cookie.Cookie c)
public List<io.netty.handler.codec.http.cookie.Cookie> getCookies()
public MediaType getSendMediaType()
public void setSendMediaType(MediaType sendMediaType)
public MediaType getAcceptMediaType()
public void setAcceptMediaType(MediaType acceptMediaType)
public void close()
Copyright © 2018 Space Applications Services. All rights reserved.