接口 HttpStack
- 所有已知实现类:
HttpClientStack,HurlStack
public interface HttpStack
An HTTP stack abstraction.
-
方法概要
修饰符和类型方法说明org.apache.http.HttpResponseperformRequest(Request<?> request, Map<String, String> additionalHeaders) Performs an HTTP request with the given parameters.
-
方法详细资料
-
performRequest
org.apache.http.HttpResponse performRequest(Request<?> request, Map<String, String> additionalHeaders) throws IOException, AuthFailureErrorPerforms 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().
- 参数:
request- the request to performadditionalHeaders- additional headers to be sent together withRequest.getHeaders()- 返回:
- the HTTP response
- 抛出:
IOExceptionAuthFailureError
-