@@ -33,42 +33,6 @@ public enum HttpMethod {
3333 GET , HEAD , POST , PUT , DELETE , CONNECT , OPTIONS , TRACE , PATCH
3434 }
3535
36- /**
37- * No parameters can be null except {@code body} and {@code charset}. All parameters must be
38- * effectively immutable, via safe copies, not mutating or otherwise.
39- *
40- * @deprecated {@link #create(HttpMethod, String, Map, byte[], Charset)}
41- */
42- @ Deprecated
43- public static Request create (String method ,
44- String url ,
45- Map <String , Collection <String >> headers ,
46- byte [] body ,
47- Charset charset ) {
48- checkNotNull (method , "httpMethod of %s" , method );
49- final HttpMethod httpMethod = HttpMethod .valueOf (method .toUpperCase ());
50- return create (httpMethod , url , headers , body , charset , null );
51- }
52-
53- /**
54- * Builds a Request. All parameters must be effectively immutable, via safe copies.
55- *
56- * @param httpMethod for the request.
57- * @param url for the request.
58- * @param headers to include.
59- * @param body of the request, can be {@literal null}
60- * @param charset of the request, can be {@literal null}
61- * @return a Request
62- */
63- @ Deprecated
64- public static Request create (HttpMethod httpMethod ,
65- String url ,
66- Map <String , Collection <String >> headers ,
67- byte [] body ,
68- Charset charset ) {
69- return create (httpMethod , url , headers , Body .create (body , charset ), null );
70- }
71-
7236 /**
7337 * Builds a Request. All parameters must be effectively immutable, via safe copies.
7438 *
@@ -132,17 +96,6 @@ public static Request create(HttpMethod httpMethod,
13296 this .requestTemplate = requestTemplate ;
13397 }
13498
135- /**
136- * Http Method for this request.
137- *
138- * @return the HttpMethod string
139- * @deprecated @see {@link #httpMethod()}
140- */
141- @ Deprecated
142- public String method () {
143- return httpMethod .name ();
144- }
145-
14699 /**
147100 * Http Method for the request.
148101 *
@@ -235,22 +188,6 @@ public static class Options {
235188 private final TimeUnit readTimeoutUnit ;
236189 private final boolean followRedirects ;
237190
238- /**
239- * Creates a new Options instance.
240- *
241- * @param connectTimeoutMillis connection timeout in milliseconds.
242- * @param readTimeoutMillis read timeout in milliseconds.
243- * @param followRedirects if the request should follow 3xx redirections.
244- *
245- * @deprecated please use {@link #Options(long, TimeUnit, long, TimeUnit, boolean)}
246- */
247- @ Deprecated
248- public Options (int connectTimeoutMillis , int readTimeoutMillis , boolean followRedirects ) {
249- this (connectTimeoutMillis , TimeUnit .MILLISECONDS ,
250- readTimeoutMillis , TimeUnit .MILLISECONDS ,
251- followRedirects );
252- }
253-
254191 /**
255192 * Creates a new Options Instance.
256193 *
@@ -271,19 +208,6 @@ public Options(long connectTimeout, TimeUnit connectTimeoutUnit,
271208 this .followRedirects = followRedirects ;
272209 }
273210
274- /**
275- * Creates a new Options instance that follows redirects by default.
276- *
277- * @param connectTimeoutMillis connection timeout in milliseconds.
278- * @param readTimeoutMillis read timeout in milliseconds.
279- *
280- * @deprecated please use {@link #Options(long, TimeUnit, long, TimeUnit, boolean)}
281- */
282- @ Deprecated
283- public Options (int connectTimeoutMillis , int readTimeoutMillis ) {
284- this (connectTimeoutMillis , readTimeoutMillis , true );
285- }
286-
287211 /**
288212 * Creates the new Options instance using the following defaults:
289213 * <ul>
@@ -431,21 +355,6 @@ public static Body create(byte[] data, Charset charset) {
431355 return new Body (data , charset );
432356 }
433357
434- /**
435- * Creates a new Request Body with charset encoded data.
436- *
437- * @param data to be encoded.
438- * @param charset to encode the data with. if {@literal null}, then data will be considered
439- * binary and will not be encoded.
440- *
441- * @return a new Request.Body instance with the encoded data.
442- * @deprecated please use {@link Request.Body#create(byte[], Charset)}
443- */
444- @ Deprecated
445- public static Body encoded (byte [] data , Charset charset ) {
446- return create (data , charset );
447- }
448-
449358 public static Body empty () {
450359 return new Body ();
451360 }
0 commit comments