1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.apache.hc.client5.http.async.methods;
29
30 import java.net.URI;
31
32 import org.apache.hc.core5.http.HttpHost;
33 import org.apache.hc.core5.http.Method;
34
35
36
37
38
39
40
41
42 @Deprecated
43 public final class SimpleHttpRequests {
44
45
46
47
48
49
50
51
52 public static SimpleHttpRequest create(final String method, final String uri) {
53 return create(Method.normalizedValueOf(method), uri);
54 }
55
56
57
58
59
60
61
62
63 public static SimpleHttpRequest create(final String method, final URI uri) {
64 return create(Method.normalizedValueOf(method), uri);
65 }
66
67 public static SimpleHttpRequest delete(final String uri) {
68 return delete(URI.create(uri));
69 }
70
71 public static SimpleHttpRequest delete(final URI uri) {
72 return create(Method.DELETE, uri);
73 }
74
75 public static SimpleHttpRequest delete(final HttpHost host, final String path) {
76 return create(Method.DELETE, host, path);
77 }
78
79 public static SimpleHttpRequest get(final String uri) {
80 return get(URI.create(uri));
81 }
82
83 public static SimpleHttpRequest get(final URI uri) {
84 return create(Method.GET, uri);
85 }
86
87 public static SimpleHttpRequest get(final HttpHost host, final String path) {
88 return create(Method.GET, host, path);
89 }
90
91 public static SimpleHttpRequest head(final String uri) {
92 return head(URI.create(uri));
93 }
94
95 public static SimpleHttpRequest head(final URI uri) {
96 return create(Method.HEAD, uri);
97 }
98
99 public static SimpleHttpRequest head(final HttpHost host, final String path) {
100 return create(Method.HEAD, host, path);
101 }
102
103 public static SimpleHttpRequest options(final String uri) {
104 return options(URI.create(uri));
105 }
106
107 public static SimpleHttpRequest options(final URI uri) {
108 return create(Method.OPTIONS, uri);
109 }
110
111 public static SimpleHttpRequest options(final HttpHost host, final String path) {
112 return create(Method.OPTIONS, host, path);
113 }
114
115 public static SimpleHttpRequest patch(final String uri) {
116 return patch(URI.create(uri));
117 }
118
119 public static SimpleHttpRequest patch(final URI uri) {
120 return create(Method.PATCH, uri);
121 }
122
123 public static SimpleHttpRequest patch(final HttpHost host, final String path) {
124 return create(Method.PATCH, host, path);
125 }
126
127 public static SimpleHttpRequest post(final String uri) {
128 return post(URI.create(uri));
129 }
130
131 public static SimpleHttpRequest post(final URI uri) {
132 return create(Method.POST, uri);
133 }
134
135 public static SimpleHttpRequest post(final HttpHost host, final String path) {
136 return create(Method.POST, host, path);
137 }
138
139 public static SimpleHttpRequest put(final String uri) {
140 return put(URI.create(uri));
141 }
142
143 public static SimpleHttpRequest put(final URI uri) {
144 return create(Method.PUT, uri);
145 }
146
147 public static SimpleHttpRequest put(final HttpHost host, final String path) {
148 return create(Method.PUT, host, path);
149 }
150
151 public static SimpleHttpRequest trace(final String uri) {
152 return trace(URI.create(uri));
153 }
154
155 public static SimpleHttpRequest trace(final URI uri) {
156 return create(Method.TRACE, uri);
157 }
158
159 public static SimpleHttpRequest trace(final HttpHost host, final String path) {
160 return create(Method.TRACE, host, path);
161 }
162
163
164
165
166
167
168
169 public static SimpleHttpRequest create(final Method method, final String uri) {
170 return create(method, URI.create(uri));
171 }
172
173
174
175
176
177
178
179 public static SimpleHttpRequest create(final Method method, final URI uri) {
180 return new SimpleHttpRequest(method, uri);
181 }
182
183
184
185
186
187
188
189
190 public static SimpleHttpRequest create(final Method method, final HttpHost host, final String path) {
191 return new SimpleHttpRequest(method, host, path);
192 }
193
194 }