public class ApacheClient extends java.lang.Object implements Client
Client which uses an implementation of Apache's HttpClient.Client.Provider| Constructor and Description |
|---|
ApacheClient()
Creates an instance backed by
DefaultHttpClient. |
ApacheClient(org.apache.http.client.HttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.HttpResponse |
execute(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest request)
Execute the specified
request using the provided client. |
Response |
execute(Request request)
Synchronously execute an HTTP represented by
request and encapsulate all response data
into a Response instance. |
public ApacheClient()
DefaultHttpClient.public ApacheClient(org.apache.http.client.HttpClient client)
public Response execute(Request request) throws java.io.IOException
Clientrequest and encapsulate all response data
into a Response instance.
Note: If the request has a body, its length and mime type will have already been added to the
header list as Content-Length and Content-Type, respectively. Do NOT alter
these values as they might have been set as a result of an application-level configuration.
protected org.apache.http.HttpResponse execute(org.apache.http.client.HttpClient client,
org.apache.http.client.methods.HttpUriRequest request)
throws java.io.IOException
request using the provided client.java.io.IOExceptionCopyright © 2014 Square, Inc.. All Rights Reserved.