retrofit.client
Class ApacheClient

java.lang.Object
  extended by retrofit.client.ApacheClient
All Implemented Interfaces:
Client
Direct Known Subclasses:
AndroidApacheClient

public class ApacheClient
extends Object
implements Client

A Client which uses an implementation of Apache's HttpClient.


Nested Class Summary
 
Nested classes/interfaces inherited from interface retrofit.client.Client
Client.Provider
 
Constructor Summary
ApacheClient()
          Creates an instance backed by DefaultHttpClient.
ApacheClient(org.apache.http.client.HttpClient client)
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApacheClient

public ApacheClient()
Creates an instance backed by DefaultHttpClient.


ApacheClient

public ApacheClient(org.apache.http.client.HttpClient client)
Method Detail

execute

public Response execute(Request request)
                 throws IOException
Description copied from interface: Client
Synchronously execute an HTTP represented by request and encapsulate all response data into a Response instance.

Specified by:
execute in interface Client
Throws:
IOException

execute

protected org.apache.http.HttpResponse execute(org.apache.http.client.HttpClient client,
                                               org.apache.http.client.methods.HttpUriRequest request)
                                        throws IOException
Execute the specified request using the provided client.

Throws:
IOException


Copyright © 2013 Square, Inc.. All Rights Reserved.