public abstract class AsyncWebClient<W>
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
AsyncWebClient() |
protected |
AsyncWebClient(W wrappedClient) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addCookie(java.lang.String url,
Cookie cookie)
Adds cookie to client.
|
abstract void |
addProxy(Proxy proxy) |
abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> |
get(java.lang.String url)
Sends a get request through wrapped client instance.
|
abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> |
get(java.lang.String url,
Cookie cookie)
Sends a get request through wrapped client instance.
|
abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> |
post(java.lang.String url,
java.lang.Object content,
org.appops.core.mime.MimeType contentType)
Sends a post request through wrapped client instance.
|
abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> |
post(java.lang.String url,
java.lang.Object content,
org.appops.core.mime.MimeType contentType,
Cookie cookie)
Sends a post request through wrapped client instance.
|
void |
setWrappedAsyncHttpClient(W wrappedClient) |
W |
wrappedAsyncHttpClient() |
protected AsyncWebClient(W wrappedClient)
protected AsyncWebClient()
public abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> get(java.lang.String url)
url - Request url.public abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> get(java.lang.String url,
Cookie cookie)
url - Request url.cookie - Cookie to be sent with request.public abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> post(java.lang.String url,
java.lang.Object content,
org.appops.core.mime.MimeType contentType)
content - Content to be posted on server.contentType - Mimetype of content.url - Request url.public abstract java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> post(java.lang.String url,
java.lang.Object content,
org.appops.core.mime.MimeType contentType,
Cookie cookie)
url - Request url.content - Content to be posted on server.contentType - Mimetype of content.cookie - Cookie to be sent with request.public abstract void addCookie(java.lang.String url,
Cookie cookie)
url - Url for which cookie is to be added.cookie - to be added.public abstract void addProxy(Proxy proxy)
public W wrappedAsyncHttpClient()
public void setWrappedAsyncHttpClient(W wrappedClient)
Copyright © 2022. All rights reserved.