Class ClassicHttpRequests
- java.lang.Object
-
- org.apache.hc.client5.http.classic.methods.ClassicHttpRequests
-
@Deprecated public final class ClassicHttpRequests extends java.lang.ObjectDeprecated.UseClassicRequestBuilderCommon HTTP methods usingHttpUriRequestas a HTTP request message representation.Each static method creates a request object of the exact subclass of
HttpUriRequestwith a non-null URI.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description ClassicHttpRequests()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HttpUriRequestcreate(java.lang.String method, java.lang.String uri)Deprecated.Creates a new HttpUriRequest for the givenmethodandStringURI.static HttpUriRequestcreate(java.lang.String method, java.net.URI uri)Deprecated.Creates a new HttpUriRequest for the givenmethodandURI.static HttpUriRequestcreate(org.apache.hc.core5.http.Method method, java.lang.String uri)Deprecated.Creates a new HttpUriRequest for the givenMethodandStringURI.static HttpUriRequestcreate(org.apache.hc.core5.http.Method method, java.net.URI uri)Deprecated.Creates a new HttpUriRequest for the givenMethodandURI.static HttpUriRequestdelete(java.lang.String uri)Deprecated.Constructs a new"DELETE"HttpUriRequest initialized with the given URI.static HttpUriRequestdelete(java.net.URI uri)Deprecated.Constructs a new"DELETE"HttpUriRequest initialized with the given URI.static HttpUriRequestget(java.lang.String uri)Deprecated.Constructs a new"GET"HttpUriRequest initialized with the given URI.static HttpUriRequestget(java.net.URI uri)Deprecated.Constructs a new"GET"HttpUriRequest initialized with the given URI.static HttpUriRequesthead(java.lang.String uri)Deprecated.Constructs a new"HEAD"HttpUriRequest initialized with the given URI.static HttpUriRequesthead(java.net.URI uri)Deprecated.Constructs a new"HEAD"HttpUriRequest initialized with the given URI.static HttpUriRequestoptions(java.lang.String uri)Deprecated.Constructs a new"OPTIONS"HttpUriRequest initialized with the given URI.static HttpUriRequestoptions(java.net.URI uri)Deprecated.Constructs a new"OPTIONS"HttpUriRequest initialized with the given URI.static HttpUriRequestpatch(java.lang.String uri)Deprecated.Constructs a new"PATCH"HttpUriRequest initialized with the given URI.static HttpUriRequestpatch(java.net.URI uri)Deprecated.Constructs a new"PATCH"HttpUriRequest initialized with the given URI.static HttpUriRequestpost(java.lang.String uri)Deprecated.Constructs a new"POST"HttpUriRequest initialized with the given URI.static HttpUriRequestpost(java.net.URI uri)Deprecated.Constructs a new"POST"HttpUriRequest initialized with the given URI.static HttpUriRequestput(java.lang.String uri)Deprecated.Constructs a new"PUT"HttpUriRequest initialized with the given URI.static HttpUriRequestput(java.net.URI uri)Deprecated.Constructs a new"PUT"HttpUriRequest initialized with the given URI.static HttpUriRequesttrace(java.lang.String uri)Deprecated.Constructs a new"TRACE"HttpUriRequest initialized with the given URI.static HttpUriRequesttrace(java.net.URI uri)Deprecated.Constructs a new"TRACE"HttpUriRequest initialized with the given URI.
-
-
-
Method Detail
-
create
public static HttpUriRequest create(org.apache.hc.core5.http.Method method, java.lang.String uri)
Deprecated.Creates a new HttpUriRequest for the givenMethodandStringURI.- Parameters:
method- A method.uri- a URI.- Returns:
- a new HttpUriRequest.
-
create
public static HttpUriRequest create(org.apache.hc.core5.http.Method method, java.net.URI uri)
Deprecated.Creates a new HttpUriRequest for the givenMethodandURI.- Parameters:
method- A method.uri- a URI.- Returns:
- a new HttpUriRequest.
-
create
public static HttpUriRequest create(java.lang.String method, java.lang.String uri)
Deprecated.Creates a new HttpUriRequest for the givenmethodandStringURI.- Parameters:
method- A method supported by this class.uri- a non-null request string URI.- Returns:
- A new HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the method is not supported.java.lang.IllegalArgumentException- if the string URI is null.
-
create
public static HttpUriRequest create(java.lang.String method, java.net.URI uri)
Deprecated.Creates a new HttpUriRequest for the givenmethodandURI.- Parameters:
method- A method supported by this class.uri- a non-null request URI.- Returns:
- A new HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the method is not supported.java.lang.IllegalArgumentException- if the URI is null.
-
delete
public static HttpUriRequest delete(java.lang.String uri)
Deprecated.Constructs a new"DELETE"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "DELETE" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
delete
public static HttpUriRequest delete(java.net.URI uri)
Deprecated.Constructs a new"DELETE"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "DELETE" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
get
public static HttpUriRequest get(java.lang.String uri)
Deprecated.Constructs a new"GET"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "GET" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
get
public static HttpUriRequest get(java.net.URI uri)
Deprecated.Constructs a new"GET"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "GET" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
head
public static HttpUriRequest head(java.lang.String uri)
Deprecated.Constructs a new"HEAD"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "HEAD" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
head
public static HttpUriRequest head(java.net.URI uri)
Deprecated.Constructs a new"HEAD"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "HEAD" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
options
public static HttpUriRequest options(java.lang.String uri)
Deprecated.Constructs a new"OPTIONS"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "OPTIONS" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
options
public static HttpUriRequest options(java.net.URI uri)
Deprecated.Constructs a new"OPTIONS"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "OPTIONS" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
patch
public static HttpUriRequest patch(java.lang.String uri)
Deprecated.Constructs a new"PATCH"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "PATCH" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
patch
public static HttpUriRequest patch(java.net.URI uri)
Deprecated.Constructs a new"PATCH"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "PATCH" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
post
public static HttpUriRequest post(java.lang.String uri)
Deprecated.Constructs a new"POST"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "POST" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
post
public static HttpUriRequest post(java.net.URI uri)
Deprecated.Constructs a new"POST"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "POST" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
put
public static HttpUriRequest put(java.lang.String uri)
Deprecated.Constructs a new"PUT"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "PUT" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
put
public static HttpUriRequest put(java.net.URI uri)
Deprecated.Constructs a new"PUT"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "PUT" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
trace
public static HttpUriRequest trace(java.lang.String uri)
Deprecated.Constructs a new"TRACE"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "TRACE" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
trace
public static HttpUriRequest trace(java.net.URI uri)
Deprecated.Constructs a new"TRACE"HttpUriRequest initialized with the given URI.- Parameters:
uri- a non-null request URI.- Returns:
- a new "TRACE" HttpUriRequest.
- Throws:
java.lang.IllegalArgumentException- if the URI is null.
-
-