public class HttpClient extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static String |
REFERER_HEADER_NAME |
Constructor and Description |
---|
HttpClient(int socketTimeout,
int connectTimeout,
int connectionRequestTimeout) |
HttpClient(int socketTimeout,
int connectTimeout,
int connectionRequestTimeout,
long interval) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T> T |
execute(ValueReader<T> valueReader,
org.apache.http.client.methods.HttpUriRequest request) |
<T> T |
get(URI uri,
Class<T> valueType) |
<T> T |
get(URI uri,
com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) |
<T> T |
get(URI uri,
ValueReader<T> valueReader) |
<T> T |
post(URI uri,
ValueReader<T> valueReader,
List<org.apache.http.NameValuePair> params) |
<T> T |
post(URI uri,
ValueReader<T> valueReader,
org.apache.http.NameValuePair... params) |
public static final String REFERER_HEADER_NAME
public HttpClient(int socketTimeout, int connectTimeout, int connectionRequestTimeout, long interval)
public HttpClient(int socketTimeout, int connectTimeout, int connectionRequestTimeout)
public <T> T get(URI uri, Class<T> valueType) throws IOException
IOException
public <T> T get(URI uri, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException
IOException
public <T> T get(URI uri, ValueReader<T> valueReader) throws IOException
IOException
public <T> T post(URI uri, ValueReader<T> valueReader, org.apache.http.NameValuePair... params) throws IOException
IOException
public <T> T post(URI uri, ValueReader<T> valueReader, List<org.apache.http.NameValuePair> params) throws IOException
IOException
public <T> T execute(ValueReader<T> valueReader, org.apache.http.client.methods.HttpUriRequest request) throws IOException
IOException
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2014–2015. All rights reserved.