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 WSRequestHolder
name
- value
- public WSRequestHolder setQueryString(java.lang.String query)
setQueryString
in interface WSRequestHolder
query
- public WSRequestHolder setQueryParameter(java.lang.String name, java.lang.String value)
setQueryParameter
in interface WSRequestHolder
name
- value
- public WSRequestHolder setAuth(java.lang.String userInfo)
setAuth
in interface WSRequestHolder
userInfo
- public WSRequestHolder setAuth(java.lang.String username, java.lang.String password)
setAuth
in interface WSRequestHolder
username
- password
- public WSRequestHolder setAuth(java.lang.String username, java.lang.String password, WSAuthScheme scheme)
setAuth
in interface WSRequestHolder
username
- password
- scheme
- authentication schemepublic WSRequestHolder sign(WSSignatureCalculator calculator)
sign
in interface WSRequestHolder
public WSRequestHolder setFollowRedirects(java.lang.Boolean followRedirects)
setFollowRedirects
in interface WSRequestHolder
followRedirects
- public WSRequestHolder setVirtualHost(java.lang.String virtualHost)
setVirtualHost
in interface WSRequestHolder
public WSRequestHolder setTimeout(int timeout)
setTimeout
in interface WSRequestHolder
timeout
- public WSRequestHolder setContentType(java.lang.String contentType)
setContentType
in interface WSRequestHolder
contentType
- The content typepublic WSRequestHolder setMethod(java.lang.String method)
WSRequestHolder
setMethod
in interface WSRequestHolder
public WSRequestHolder setBody(java.lang.String body)
WSRequestHolder
setBody
in interface WSRequestHolder
public WSRequestHolder setBody(com.fasterxml.jackson.databind.JsonNode body)
WSRequestHolder
setBody
in interface WSRequestHolder
public WSRequestHolder setBody(java.io.InputStream body)
WSRequestHolder
setBody
in interface WSRequestHolder
public WSRequestHolder setBody(java.io.File body)
WSRequestHolder
setBody
in interface WSRequestHolder
public java.lang.String getUrl()
getUrl
in interface WSRequestHolder
public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getHeaders()
getHeaders
in interface WSRequestHolder
public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getQueryParameters()
getQueryParameters
in interface WSRequestHolder
public java.lang.String getUsername()
getUsername
in interface WSRequestHolder
public java.lang.String getPassword()
getPassword
in interface WSRequestHolder
public WSAuthScheme getScheme()
getScheme
in interface WSRequestHolder
public WSSignatureCalculator getCalculator()
getCalculator
in interface WSRequestHolder
public int getTimeout()
getTimeout
in interface WSRequestHolder
public java.lang.Boolean getFollowRedirects()
getFollowRedirects
in interface WSRequestHolder
public F.Promise<WSResponse> get()
get
in interface WSRequestHolder
public F.Promise<WSResponse> patch(java.lang.String body)
patch
in interface WSRequestHolder
body
- represented as Stringpublic F.Promise<WSResponse> post(java.lang.String body)
post
in interface WSRequestHolder
body
- represented as Stringpublic F.Promise<WSResponse> put(java.lang.String body)
put
in interface WSRequestHolder
body
- represented as Stringpublic F.Promise<WSResponse> patch(com.fasterxml.jackson.databind.JsonNode body)
patch
in interface WSRequestHolder
body
- represented as JSONpublic F.Promise<WSResponse> post(com.fasterxml.jackson.databind.JsonNode body)
post
in interface WSRequestHolder
body
- represented as JSONpublic F.Promise<WSResponse> put(com.fasterxml.jackson.databind.JsonNode body)
put
in interface WSRequestHolder
body
- represented as JSONpublic F.Promise<WSResponse> patch(java.io.InputStream body)
patch
in interface WSRequestHolder
body
- represented as an InputStreampublic F.Promise<WSResponse> post(java.io.InputStream body)
post
in interface WSRequestHolder
body
- represented as an InputStreampublic F.Promise<WSResponse> put(java.io.InputStream body)
put
in interface WSRequestHolder
body
- represented as an InputStreampublic F.Promise<WSResponse> post(java.io.File body)
post
in interface WSRequestHolder
body
- represented as a Filepublic F.Promise<WSResponse> put(java.io.File body)
put
in interface WSRequestHolder
body
- represented as a Filepublic F.Promise<WSResponse> delete()
delete
in interface WSRequestHolder
public F.Promise<WSResponse> head()
head
in interface WSRequestHolder
public F.Promise<WSResponse> options()
options
in interface WSRequestHolder
public F.Promise<WSResponse> execute(java.lang.String method)
execute
in interface WSRequestHolder
method
- The method to executepublic F.Promise<WSResponse> execute()
WSRequestHolder
execute
in interface WSRequestHolder