public class URLConnectionClient extends java.lang.Object implements HttpClient
HttpClient3 or HttpClient4 perform better than this class, as a rule; since they do things like connection pooling. They also support reading the body of an HTTP response whose status code isn't 200 (OK), which can enable your application to handle problems better.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
EOL |
CONNECT_TIMEOUT, DELETE, FOLLOW_REDIRECTS, GET, POST, PUT, READ_TIMEOUT
Constructor and Description |
---|
URLConnectionClient() |
Modifier and Type | Method and Description |
---|---|
HttpResponseMessage |
execute(HttpMessage request,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Send a message to the service provider and get the response.
|
private static final java.lang.String EOL
public HttpResponseMessage execute(HttpMessage request, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.io.IOException
execute
in interface HttpClient
parameters
- HTTP client parameters, as a map from parameter name to value.
Parameter names are defined as constants below.java.io.IOException