public class ApacheHttpClient extends AbstractHttpClient implements HttpClient
HttpClient using apache http client
library under the hood.| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
buildRequest(HttpMethod httpMethod,
HttpUrl endpoint)
Build request object.
|
static ApacheHttpClient |
defaultApacheHttpClient(EmbeddedServer<?> server)
Create new http client using default internal client.
|
void |
destroy()
Destroy client.
|
boolean |
isDestroyed()
Check that HTTP client has been destroyed.
|
static ApacheHttpClient |
newApacheHttpClient(EmbeddedServer<?> server,
org.apache.http.impl.client.CloseableHttpClient client)
Deprecated.
|
static ApacheHttpClient |
newApacheHttpClient(HttpClientConfiguration configuration,
EmbeddedServer<?> server)
Create new http client using custom configuration.
|
finalize, getConfiguration, prepareDelete, prepareGet, prepareHead, preparePatch, preparePost, preparePut, prepareRequestclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, prepareDelete, prepareGet, prepareHead, preparePatch, preparePost, preparePut, prepareRequest@Deprecated public static ApacheHttpClient newApacheHttpClient(EmbeddedServer<?> server, org.apache.http.impl.client.CloseableHttpClient client)
newApacheHttpClient(HttpClientConfiguration, EmbeddedServer)server - Embedded server.client - Internal http clientNullPointerException - If server of client are null.public static ApacheHttpClient defaultApacheHttpClient(EmbeddedServer<?> server)
server - Embedded server.NullPointerException - If server is null.public static ApacheHttpClient newApacheHttpClient(HttpClientConfiguration configuration, EmbeddedServer<?> server)
configuration - Client configuration.server - Embedded server.NullPointerException - If server or configuration are null.protected HttpRequest buildRequest(HttpMethod httpMethod, HttpUrl endpoint)
AbstractHttpClientbuildRequest in class AbstractHttpClienthttpMethod - Http method.endpoint - Request url.public void destroy()
HttpClientdestroy in interface HttpClientpublic boolean isDestroyed()
HttpClientisDestroyed in interface HttpClienttrue if client is closed, false otherwise.Copyright © 2018. All rights reserved.