public class SimpleHttpRequestFactory extends java.lang.Object implements HttpRequestFactory
HttpRequestFactory
implementation.
This is the default fallback factory.INSTANCE
Constructor and Description |
---|
SimpleHttpRequestFactory() |
Modifier and Type | Method and Description |
---|---|
<T> MutableHttpRequest<T> |
create(HttpMethod httpMethod,
java.lang.String uri)
Create a new
MutableHttpRequest for the given method and URI. |
<T> MutableHttpRequest<T> |
delete(java.lang.String uri,
T body)
Return a
MutableHttpRequest that executes an HttpMethod.DELETE request for the given URI. |
<T> MutableHttpRequest<T> |
get(java.lang.String uri)
Return a
MutableHttpRequest that executes an HttpMethod.GET request for the given URI. |
<T> MutableHttpRequest<T> |
head(java.lang.String uri)
Return a
MutableHttpRequest that executes an HttpMethod.HEAD request for the given URI. |
<T> MutableHttpRequest<T> |
options(java.lang.String uri)
Return a
MutableHttpRequest that executes an HttpMethod.OPTIONS request for the given URI. |
<T> MutableHttpRequest<T> |
patch(java.lang.String uri,
T body)
Return a
MutableHttpRequest that executes an HttpMethod.PATCH request for the given URI. |
<T> MutableHttpRequest<T> |
post(java.lang.String uri,
T body)
Return a
MutableHttpRequest that executes an HttpMethod.POST request for the given URI. |
<T> MutableHttpRequest<T> |
put(java.lang.String uri,
T body)
Return a
MutableHttpRequest that executes an HttpMethod.PUT request for the given URI. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
public <T> MutableHttpRequest<T> get(java.lang.String uri)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.GET
request for the given URI.get
in interface HttpRequestFactory
T
- The Http request typeuri
- The URIMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> post(java.lang.String uri, T body)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.POST
request for the given URI.post
in interface HttpRequestFactory
T
- The body typeuri
- The URIbody
- The bodyMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> put(java.lang.String uri, T body)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.PUT
request for the given URI.put
in interface HttpRequestFactory
T
- The body typeuri
- The URIbody
- The bodyMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> patch(java.lang.String uri, T body)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.PATCH
request for the given URI.patch
in interface HttpRequestFactory
T
- The body typeuri
- The URIbody
- The bodyMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> head(java.lang.String uri)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.HEAD
request for the given URI.head
in interface HttpRequestFactory
T
- The Http request typeuri
- The URIMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> options(java.lang.String uri)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.OPTIONS
request for the given URI.options
in interface HttpRequestFactory
T
- The Http request typeuri
- The URIMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> delete(java.lang.String uri, T body)
HttpRequestFactory
MutableHttpRequest
that executes an HttpMethod.DELETE
request for the given URI.delete
in interface HttpRequestFactory
T
- The body typeuri
- The URIbody
- an optional bodyMutableHttpRequest
instancepublic <T> MutableHttpRequest<T> create(HttpMethod httpMethod, java.lang.String uri)
HttpRequestFactory
MutableHttpRequest
for the given method and URI.create
in interface HttpRequestFactory
T
- The Http request typehttpMethod
- The methoduri
- The URI