public class HttpClient extends Object implements AutoCloseable
Constructor and Description |
---|
HttpClient(int socketTimeout,
int connectTimeout,
int connectionRequestTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<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 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 void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2013–2015. All rights reserved.