1 package com.foxinmy.weixin4j.http;
2
3 import java.util.Set;
4
5 import com.foxinmy.weixin4j.http.entity.HttpEntity;
6
7
8
9
10
11
12
13
14
15
16 public interface HttpClient {
17
18
19 HttpResponse get(String url) throws HttpClientException;
20
21 HttpResponse get(String url, URLParameter... parameters)
22 throws HttpClientException;
23
24
25 HttpHeaders head(String url) throws HttpClientException;
26
27 HttpHeaders head(String url, URLParameter... parameters)
28 throws HttpClientException;
29
30
31 HttpResponse post(String url) throws HttpClientException;
32
33 HttpResponse post(String url, URLParameter... parameters)
34 throws HttpClientException;
35
36 HttpResponse post(String url, HttpEntity httpEntity)
37 throws HttpClientException;
38
39
40 void put(String url) throws HttpClientException;
41
42 void put(String url, URLParameter... parameters) throws HttpClientException;
43
44
45 void delete(String url) throws HttpClientException;
46
47 void delete(String url, URLParameter... parameters)
48 throws HttpClientException;
49
50
51 Set<HttpMethod> options(String url) throws HttpClientException;
52
53 Set<HttpMethod> options(String url, URLParameter... parameters)
54 throws HttpClientException;
55
56
57
58
59
60
61
62
63
64 HttpResponse execute(HttpRequest request) throws HttpClientException;
65 }