com.foxinmy.weixin4j.http
Interface HttpClient

All Known Implementing Classes:
AbstractHttpClient, HttpComponent3, HttpComponent4, HttpComponent4_1, HttpComponent4_2, Netty4HttpClient, OkHttpClient2, OkHttpClient3, SimpleHttpClient

public interface HttpClient

HTTP 接口

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:

Method Summary
 void delete(String url)
           
 void delete(String url, URLParameter... parameters)
           
 HttpResponse execute(HttpRequest request)
          处理请求
 HttpResponse get(String url)
           
 HttpResponse get(String url, URLParameter... parameters)
           
 HttpHeaders head(String url)
           
 HttpHeaders head(String url, URLParameter... parameters)
           
 Set<HttpMethod> options(String url)
           
 Set<HttpMethod> options(String url, URLParameter... parameters)
           
 HttpResponse post(String url)
           
 HttpResponse post(String url, HttpEntity httpEntity)
           
 HttpResponse post(String url, URLParameter... parameters)
           
 void put(String url)
           
 void put(String url, URLParameter... parameters)
           
 

Method Detail

get

HttpResponse get(String url)
                 throws HttpClientException
Throws:
HttpClientException

get

HttpResponse get(String url,
                 URLParameter... parameters)
                 throws HttpClientException
Throws:
HttpClientException

head

HttpHeaders head(String url)
                 throws HttpClientException
Throws:
HttpClientException

head

HttpHeaders head(String url,
                 URLParameter... parameters)
                 throws HttpClientException
Throws:
HttpClientException

post

HttpResponse post(String url)
                  throws HttpClientException
Throws:
HttpClientException

post

HttpResponse post(String url,
                  URLParameter... parameters)
                  throws HttpClientException
Throws:
HttpClientException

post

HttpResponse post(String url,
                  HttpEntity httpEntity)
                  throws HttpClientException
Throws:
HttpClientException

put

void put(String url)
         throws HttpClientException
Throws:
HttpClientException

put

void put(String url,
         URLParameter... parameters)
         throws HttpClientException
Throws:
HttpClientException

delete

void delete(String url)
            throws HttpClientException
Throws:
HttpClientException

delete

void delete(String url,
            URLParameter... parameters)
            throws HttpClientException
Throws:
HttpClientException

options

Set<HttpMethod> options(String url)
                        throws HttpClientException
Throws:
HttpClientException

options

Set<HttpMethod> options(String url,
                        URLParameter... parameters)
                        throws HttpClientException
Throws:
HttpClientException

execute

HttpResponse execute(HttpRequest request)
                     throws HttpClientException
处理请求

Parameters:
request - 请求对象
Returns:
响应对象
Throws:
HttpClientException


Copyright © 2014–2017. All rights reserved.