public final class ClassicHttpRequests extends Object
HttpUriRequest
as a HTTP request message representation.
Each static method creates a request object of the exact subclass of HttpUriRequest
with a non-null URI.
Constructor and Description |
---|
ClassicHttpRequests() |
Modifier and Type | Method and Description |
---|---|
static HttpUriRequest |
create(Method method,
String uri)
Creates a new HttpUriRequest for the given
Method and String URI. |
static HttpUriRequest |
create(Method method,
URI uri)
Creates a new HttpUriRequest for the given
Method and URI . |
static HttpUriRequest |
create(String method,
String uri)
Creates a new HttpUriRequest for the given
method and String URI. |
static HttpUriRequest |
create(String method,
URI uri)
Creates a new HttpUriRequest for the given
method and URI . |
static HttpUriRequest |
delete(String uri) |
static HttpUriRequest |
delete(URI uri) |
static HttpUriRequest |
get(String uri) |
static HttpUriRequest |
get(URI uri) |
static HttpUriRequest |
head(String uri) |
static HttpUriRequest |
head(URI uri) |
static HttpUriRequest |
options(String uri) |
static HttpUriRequest |
options(URI uri) |
static HttpUriRequest |
patch(String uri) |
static HttpUriRequest |
patch(URI uri) |
static HttpUriRequest |
post(String uri) |
static HttpUriRequest |
post(URI uri) |
static HttpUriRequest |
put(String uri) |
static HttpUriRequest |
put(URI uri) |
static HttpUriRequest |
trace(String uri) |
static HttpUriRequest |
trace(URI uri) |
public static HttpUriRequest create(Method method, String uri)
Method
and String
URI.method
- A method.uri
- a URI.public static HttpUriRequest create(Method method, URI uri)
Method
and URI
.method
- A method.uri
- a URI.public static HttpUriRequest create(String method, String uri)
method
and String
URI.method
- A method supported by this class.uri
- a non-null request string URI.IllegalArgumentException
- if the method is not supported.IllegalArgumentException
- if the string uri is null.public static HttpUriRequest create(String method, URI uri)
method
and URI
.method
- A method supported by this class.uri
- a non-null request URI.IllegalArgumentException
- if the method is not supported.IllegalArgumentException
- if the uri is null.public static HttpUriRequest delete(String uri)
public static HttpUriRequest delete(URI uri)
public static HttpUriRequest get(String uri)
public static HttpUriRequest get(URI uri)
public static HttpUriRequest head(String uri)
public static HttpUriRequest head(URI uri)
public static HttpUriRequest options(String uri)
public static HttpUriRequest options(URI uri)
public static HttpUriRequest patch(String uri)
public static HttpUriRequest patch(URI uri)
public static HttpUriRequest post(String uri)
public static HttpUriRequest post(URI uri)
public static HttpUriRequest put(String uri)
public static HttpUriRequest put(URI uri)
public static HttpUriRequest trace(String uri)
public static HttpUriRequest trace(URI uri)