| Constructor and Description |
|---|
NingWSRequest(NingWSClient client,
java.lang.String url) |
| Modifier and Type | Method and Description |
|---|---|
F.Promise<WSResponse> |
delete()
Perform a DELETE on the request asynchronously.
|
F.Promise<WSResponse> |
execute()
Execute an arbitrary method on the request asynchronously.
|
F.Promise<WSResponse> |
execute(java.lang.String method)
Execute an arbitrary method on the request asynchronously.
|
F.Promise<WSResponse> |
get()
Perform a GET on the request asynchronously.
|
WSSignatureCalculator |
getCalculator() |
java.lang.Boolean |
getFollowRedirects() |
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getHeaders() |
java.lang.String |
getPassword() |
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getQueryParameters() |
long |
getRequestTimeout()
Gets the original request timeout in milliseconds, passed into the
request as input.
|
WSAuthScheme |
getScheme() |
java.lang.String |
getUrl() |
java.lang.String |
getUsername() |
F.Promise<WSResponse> |
head()
Perform a HEAD on the request asynchronously.
|
F.Promise<WSResponse> |
options()
Perform an OPTIONS on the request asynchronously.
|
F.Promise<WSResponse> |
patch(java.io.File body)
Perform a PATCH on the request asynchronously.
|
F.Promise<WSResponse> |
patch(java.io.InputStream body)
Perform a PATCH on the request asynchronously.
|
F.Promise<WSResponse> |
patch(com.fasterxml.jackson.databind.JsonNode body)
Perform a PATCH on the request asynchronously.
|
F.Promise<WSResponse> |
patch(java.lang.String body)
Perform a PATCH on the request asynchronously.
|
F.Promise<WSResponse> |
post(java.io.File body)
Perform a POST on the request asynchronously.
|
F.Promise<WSResponse> |
post(java.io.InputStream body)
Perform a POST on the request asynchronously.
|
F.Promise<WSResponse> |
post(com.fasterxml.jackson.databind.JsonNode body)
Perform a POST on the request asynchronously.
|
F.Promise<WSResponse> |
post(java.lang.String body)
Perform a POST on the request asynchronously.
|
F.Promise<WSResponse> |
put(java.io.File body)
Perform a PUT on the request asynchronously.
|
F.Promise<WSResponse> |
put(java.io.InputStream body)
Perform a PUT on the request asynchronously.
|
F.Promise<WSResponse> |
put(com.fasterxml.jackson.databind.JsonNode body)
Perform a PUT on the request asynchronously.
|
F.Promise<WSResponse> |
put(java.lang.String body)
Perform a PUT on the request asynchronously.
|
WSRequest |
setAuth(java.lang.String userInfo)
Sets the authentication header for the current request using BASIC authentication.
|
WSRequest |
setAuth(java.lang.String username,
java.lang.String password)
Sets the authentication header for the current request using BASIC authentication.
|
WSRequest |
setAuth(java.lang.String username,
java.lang.String password,
WSAuthScheme scheme)
Sets the authentication header for the current request.
|
WSRequest |
setBody(java.io.File body)
Set the body this request should use.
|
WSRequest |
setBody(java.io.InputStream body)
Set the body this request should use.
|
WSRequest |
setBody(com.fasterxml.jackson.databind.JsonNode body)
Set the body this request should use.
|
WSRequest |
setBody(java.lang.String body)
Set the body this request should use.
|
WSRequest |
setContentType(java.lang.String contentType)
Set the content type.
|
WSRequest |
setFollowRedirects(java.lang.Boolean followRedirects)
Sets whether redirects (301, 302) should be followed automatically.
|
NingWSRequest |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header with the given name, this can be called repeatedly.
|
WSRequest |
setMethod(java.lang.String method)
Set the HTTP method this request should use, where the no args execute() method is invoked.
|
WSRequest |
setQueryParameter(java.lang.String name,
java.lang.String value)
Sets a query parameter with the given name, this can be called repeatedly.
|
WSRequest |
setQueryString(java.lang.String query)
Sets a query string
|
WSRequest |
setRequestTimeout(long timeout)
Sets the request timeout in milliseconds.
|
WSRequest |
setVirtualHost(java.lang.String virtualHost)
Sets the virtual host as a "hostname:port" string.
|
WSRequest |
sign(WSSignatureCalculator calculator)
Sets an (OAuth) signature calculator.
|
public NingWSRequest(NingWSClient client, java.lang.String url)
public NingWSRequest setHeader(java.lang.String name, java.lang.String value)
public WSRequest setQueryString(java.lang.String query)
setQueryString in interface WSRequestquery - public WSRequest setQueryParameter(java.lang.String name, java.lang.String value)
WSRequestsetQueryParameter in interface WSRequestpublic WSRequest setAuth(java.lang.String userInfo)
WSRequestpublic WSRequest setAuth(java.lang.String username, java.lang.String password)
WSRequestpublic WSRequest setAuth(java.lang.String username, java.lang.String password, WSAuthScheme scheme)
WSRequestpublic WSRequest sign(WSSignatureCalculator calculator)
WSRequestpublic WSRequest setFollowRedirects(java.lang.Boolean followRedirects)
WSRequestsetFollowRedirects in interface WSRequestpublic WSRequest setVirtualHost(java.lang.String virtualHost)
WSRequestsetVirtualHost in interface WSRequestpublic WSRequest setRequestTimeout(long timeout)
WSRequestsetRequestTimeout in interface WSRequesttimeout - the request timeout in milliseconds.public WSRequest setContentType(java.lang.String contentType)
WSRequestsetContentType in interface WSRequestcontentType - The content typepublic WSRequest setMethod(java.lang.String method)
WSRequestpublic WSRequest setBody(java.lang.String body)
WSRequestpublic WSRequest setBody(com.fasterxml.jackson.databind.JsonNode body)
WSRequestpublic WSRequest setBody(java.io.InputStream body)
WSRequestpublic WSRequest setBody(java.io.File body)
WSRequestpublic java.lang.String getUrl()
public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getHeaders()
getHeaders in interface WSRequestpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getQueryParameters()
getQueryParameters in interface WSRequestpublic java.lang.String getUsername()
getUsername in interface WSRequestpublic java.lang.String getPassword()
getPassword in interface WSRequestpublic WSAuthScheme getScheme()
public WSSignatureCalculator getCalculator()
getCalculator in interface WSRequestpublic long getRequestTimeout()
WSRequestgetRequestTimeout in interface WSRequestpublic java.lang.Boolean getFollowRedirects()
getFollowRedirects in interface WSRequestpublic F.Promise<WSResponse> get()
WSRequestpublic F.Promise<WSResponse> patch(java.lang.String body)
WSRequestpublic F.Promise<WSResponse> patch(com.fasterxml.jackson.databind.JsonNode body)
WSRequestpublic F.Promise<WSResponse> patch(java.io.InputStream body)
WSRequestpublic F.Promise<WSResponse> patch(java.io.File body)
WSRequestpublic F.Promise<WSResponse> post(java.lang.String body)
WSRequestpublic F.Promise<WSResponse> post(com.fasterxml.jackson.databind.JsonNode body)
WSRequestpublic F.Promise<WSResponse> post(java.io.InputStream body)
WSRequestpublic F.Promise<WSResponse> post(java.io.File body)
WSRequestpublic F.Promise<WSResponse> put(java.lang.String body)
WSRequestpublic F.Promise<WSResponse> put(com.fasterxml.jackson.databind.JsonNode body)
WSRequestpublic F.Promise<WSResponse> put(java.io.InputStream body)
WSRequestpublic F.Promise<WSResponse> put(java.io.File body)
WSRequestpublic F.Promise<WSResponse> delete()
WSRequestpublic F.Promise<WSResponse> head()
WSRequestpublic F.Promise<WSResponse> options()
WSRequestpublic F.Promise<WSResponse> execute(java.lang.String method)
WSRequestpublic F.Promise<WSResponse> execute()
WSRequest