com.duowan.mobile.netroid.stack
Interface HttpStack

All Known Implementing Classes:
HttpClientStack, HurlStack

public interface HttpStack

An HTTP stack abstraction.


Method Summary
 org.apache.http.HttpResponse performRequest(Request<?> request)
          Performs an HTTP request with the given parameters.
 

Method Detail

performRequest

org.apache.http.HttpResponse performRequest(Request<?> request)
                                            throws java.io.IOException,
                                                   AuthFailureError
Performs an HTTP request with the given parameters.

A GET request is sent if request.getPostBody() == null. A POST request is sent otherwise, and the Content-Type header is set to request.getPostBodyContentType().

Parameters:
request - the request to perform
Returns:
the HTTP response
Throws:
java.io.IOException
AuthFailureError