public class CommonHttpClient extends Object implements HttpClient
| Modifier and Type | Class and Description |
|---|---|
static class |
CommonHttpClient.TimeoutThread
Some sites may have timeouts, but the connection timeout does not seem to work reliably.
|
| Constructor and Description |
|---|
CommonHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
protected Authenticator |
createAuthenticator(HttpOptions options) |
protected void |
putAuthorization(URLConnection connection,
String header,
String username,
String password) |
protected Response |
request(Method method,
Map<String,String> extraHeader,
byte[] body,
URL url,
HttpOptions options) |
Response |
request(String resource) |
Response |
request(String resource,
Method method,
Map<String,String> extraHeader,
Map<String,List<String>> parameters,
byte[] body,
HttpOptions options) |
Response |
request(String protocol,
String host,
Integer port,
String path,
Method method,
Map<String,String> extraHeader,
Map<String,List<String>> parameters,
byte[] body) |
protected void |
startTimeoutThread(HttpURLConnection connection,
HttpOptions options) |
public Response request(String resource) throws HttpClientException
HttpClientExceptionpublic Response request(String protocol, String host, Integer port, String path, Method method, Map<String,String> extraHeader, Map<String,List<String>> parameters, byte[] body) throws HttpClientException
HttpClientExceptionpublic Response request(String resource, Method method, Map<String,String> extraHeader, Map<String,List<String>> parameters, byte[] body, HttpOptions options) throws HttpClientException
request in interface HttpClientHttpClientExceptionprotected Response request(Method method, Map<String,String> extraHeader, byte[] body, URL url, HttpOptions options) throws HttpClientException
HttpClientExceptionprotected Authenticator createAuthenticator(HttpOptions options)
protected void putAuthorization(URLConnection connection, String header, String username, String password)
protected void startTimeoutThread(HttpURLConnection connection, HttpOptions options)
Copyright © 2017. All rights reserved.