public class ApacheClient extends 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 IOException
Client
request
and encapsulate all response data
into a Response
instance.execute
in interface Client
IOException
protected org.apache.http.HttpResponse execute(org.apache.http.client.HttpClient client, org.apache.http.client.methods.HttpUriRequest request) throws IOException
request
using the provided client
.IOException
Copyright © 2013 Square, Inc.. All Rights Reserved.