public class NingWSRequestHolder extends java.lang.Object implements WSRequestHolder
| Constructor and Description |
|---|
NingWSRequestHolder(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 the request
|
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() |
WSAuthScheme |
getScheme() |
int |
getTimeout() |
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.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.
|
WSRequestHolder |
setAuth(java.lang.String userInfo)
Sets the authentication header for the current request using BASIC authentication.
|
WSRequestHolder |
setAuth(java.lang.String username,
java.lang.String password)
Sets the authentication header for the current request using BASIC authentication.
|
WSRequestHolder |
setAuth(java.lang.String username,
java.lang.String password,
WSAuthScheme scheme)
Sets the authentication header for the current request.
|
WSRequestHolder |
setBody(java.io.File body)
Set the body this request should use
|
WSRequestHolder |
setBody(java.io.InputStream body)
Set the body this request should use
|
WSRequestHolder |
setBody(com.fasterxml.jackson.databind.JsonNode body)
Set the body this request should use
|
WSRequestHolder |
setBody(java.lang.String body)
Set the body this request should use
|
WSRequestHolder |
setContentType(java.lang.String contentType)
Set the content type.
|
WSRequestHolder |
setFollowRedirects(java.lang.Boolean followRedirects)
Sets whether redirects (301, 302) should be followed automatically.
|
NingWSRequestHolder |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header with the given name, this can be called repeatedly.
|
WSRequestHolder |
setMethod(java.lang.String method)
Set the method this request should use.
|
WSRequestHolder |
setQueryParameter(java.lang.String name,
java.lang.String value)
Sets a query parameter with the given name,this can be called repeatedly.
|
WSRequestHolder |
setQueryString(java.lang.String query)
Sets a query string
|
WSRequestHolder |
setTimeout(int timeout)
Sets the request timeout in milliseconds.
|
WSRequestHolder |
setVirtualHost(java.lang.String virtualHost)
Sets the virtual host.
|
WSRequestHolder |
sign(WSSignatureCalculator calculator) |
public NingWSRequestHolder(NingWSClient client, java.lang.String url)
public NingWSRequestHolder setHeader(java.lang.String name, java.lang.String value)
setHeader in interface WSRequestHoldername - value - public WSRequestHolder setQueryString(java.lang.String query)
setQueryString in interface WSRequestHolderquery - public WSRequestHolder setQueryParameter(java.lang.String name, java.lang.String value)
setQueryParameter in interface WSRequestHoldername - value - public WSRequestHolder setAuth(java.lang.String userInfo)
setAuth in interface WSRequestHolderuserInfo - public WSRequestHolder setAuth(java.lang.String username, java.lang.String password)
setAuth in interface WSRequestHolderusername - password - public WSRequestHolder setAuth(java.lang.String username, java.lang.String password, WSAuthScheme scheme)
setAuth in interface WSRequestHolderusername - password - scheme - authentication schemepublic WSRequestHolder sign(WSSignatureCalculator calculator)
sign in interface WSRequestHolderpublic WSRequestHolder setFollowRedirects(java.lang.Boolean followRedirects)
setFollowRedirects in interface WSRequestHolderfollowRedirects - public WSRequestHolder setVirtualHost(java.lang.String virtualHost)
setVirtualHost in interface WSRequestHolderpublic WSRequestHolder setTimeout(int timeout)
setTimeout in interface WSRequestHoldertimeout - public WSRequestHolder setContentType(java.lang.String contentType)
setContentType in interface WSRequestHoldercontentType - The content typepublic WSRequestHolder setMethod(java.lang.String method)
WSRequestHoldersetMethod in interface WSRequestHolderpublic WSRequestHolder setBody(java.lang.String body)
WSRequestHoldersetBody in interface WSRequestHolderpublic WSRequestHolder setBody(com.fasterxml.jackson.databind.JsonNode body)
WSRequestHoldersetBody in interface WSRequestHolderpublic WSRequestHolder setBody(java.io.InputStream body)
WSRequestHoldersetBody in interface WSRequestHolderpublic WSRequestHolder setBody(java.io.File body)
WSRequestHoldersetBody in interface WSRequestHolderpublic java.lang.String getUrl()
getUrl in interface WSRequestHolderpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getHeaders()
getHeaders in interface WSRequestHolderpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getQueryParameters()
getQueryParameters in interface WSRequestHolderpublic java.lang.String getUsername()
getUsername in interface WSRequestHolderpublic java.lang.String getPassword()
getPassword in interface WSRequestHolderpublic WSAuthScheme getScheme()
getScheme in interface WSRequestHolderpublic WSSignatureCalculator getCalculator()
getCalculator in interface WSRequestHolderpublic int getTimeout()
getTimeout in interface WSRequestHolderpublic java.lang.Boolean getFollowRedirects()
getFollowRedirects in interface WSRequestHolderpublic F.Promise<WSResponse> get()
get in interface WSRequestHolderpublic F.Promise<WSResponse> patch(java.lang.String body)
patch in interface WSRequestHolderbody - represented as Stringpublic F.Promise<WSResponse> post(java.lang.String body)
post in interface WSRequestHolderbody - represented as Stringpublic F.Promise<WSResponse> put(java.lang.String body)
put in interface WSRequestHolderbody - represented as Stringpublic F.Promise<WSResponse> patch(com.fasterxml.jackson.databind.JsonNode body)
patch in interface WSRequestHolderbody - represented as JSONpublic F.Promise<WSResponse> post(com.fasterxml.jackson.databind.JsonNode body)
post in interface WSRequestHolderbody - represented as JSONpublic F.Promise<WSResponse> put(com.fasterxml.jackson.databind.JsonNode body)
put in interface WSRequestHolderbody - represented as JSONpublic F.Promise<WSResponse> patch(java.io.InputStream body)
patch in interface WSRequestHolderbody - represented as an InputStreampublic F.Promise<WSResponse> post(java.io.InputStream body)
post in interface WSRequestHolderbody - represented as an InputStreampublic F.Promise<WSResponse> put(java.io.InputStream body)
put in interface WSRequestHolderbody - represented as an InputStreampublic F.Promise<WSResponse> post(java.io.File body)
post in interface WSRequestHolderbody - represented as a Filepublic F.Promise<WSResponse> put(java.io.File body)
put in interface WSRequestHolderbody - represented as a Filepublic F.Promise<WSResponse> delete()
delete in interface WSRequestHolderpublic F.Promise<WSResponse> head()
head in interface WSRequestHolderpublic F.Promise<WSResponse> options()
options in interface WSRequestHolderpublic F.Promise<WSResponse> execute(java.lang.String method)
execute in interface WSRequestHoldermethod - The method to executepublic F.Promise<WSResponse> execute()
WSRequestHolderexecute in interface WSRequestHolder