public static class WS.WSRequestHolder
extends java.lang.Object
Constructor and Description |
---|
WS.WSRequestHolder(java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
F.Promise<WS.Response> |
delete()
Perform a DELETE on the request asynchronously.
|
F.Promise<WS.Response> |
execute(java.lang.String method)
Execute an arbitrary method on the request asynchronously.
|
F.Promise<WS.Response> |
get()
Perform a GET on the request asynchronously.
|
F.Promise<WS.Response> |
head()
Perform a HEAD on the request asynchronously.
|
F.Promise<WS.Response> |
options()
Perform an OPTIONS on the request asynchronously.
|
F.Promise<WS.Response> |
post(java.io.File body)
Perform a POST on the request asynchronously.
|
F.Promise<WS.Response> |
post(java.io.InputStream body)
Perform a POST on the request asynchronously.
|
F.Promise<WS.Response> |
post(org.codehaus.jackson.JsonNode body)
Perform a POST on the request asynchronously.
|
F.Promise<WS.Response> |
post(java.lang.String body)
Perform a POST on the request asynchronously.
|
F.Promise<WS.Response> |
put(java.io.File body)
Perform a PUT on the request asynchronously.
|
F.Promise<WS.Response> |
put(java.io.InputStream body)
Perform a PUT on the request asynchronously.
|
F.Promise<WS.Response> |
put(org.codehaus.jackson.JsonNode body)
Perform a PUT on the request asynchronously.
|
F.Promise<WS.Response> |
put(java.lang.String body)
Perform a PUT on the request asynchronously.
|
WS.WSRequestHolder |
setAuth(java.lang.String username,
java.lang.String password)
Sets the authentication header for the current request using BASIC authentication.
|
WS.WSRequestHolder |
setAuth(java.lang.String username,
java.lang.String password,
com.ning.http.client.Realm.AuthScheme scheme)
Sets the authentication header for the current request.
|
WS.WSRequestHolder |
setContentType(java.lang.String contentType)
Set the content type.
|
WS.WSRequestHolder |
setFollowRedirects(java.lang.Boolean followRedirects)
Sets whether redirects (301, 302) should be followed automatically
|
WS.WSRequestHolder |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header with the given name, this can be called repeatedly
|
WS.WSRequestHolder |
setQueryParameter(java.lang.String name,
java.lang.String value)
Sets a query parameter with the given name,this can be called repeatedly
|
WS.WSRequestHolder |
setTimeout(int timeout)
Sets the request timeout in milliseconds
|
WS.WSRequestHolder |
sign(WS.SignatureCalculator calculator) |
public WS.WSRequestHolder setHeader(java.lang.String name, java.lang.String value)
name
- value
- public WS.WSRequestHolder setQueryParameter(java.lang.String name, java.lang.String value)
name
- value
- public WS.WSRequestHolder setAuth(java.lang.String username, java.lang.String password)
username
- password
- public WS.WSRequestHolder setAuth(java.lang.String username, java.lang.String password, com.ning.http.client.Realm.AuthScheme scheme)
username
- password
- scheme
- authentication schemepublic WS.WSRequestHolder sign(WS.SignatureCalculator calculator)
public WS.WSRequestHolder setFollowRedirects(java.lang.Boolean followRedirects)
followRedirects
- public WS.WSRequestHolder setTimeout(int timeout)
timeout
- public WS.WSRequestHolder setContentType(java.lang.String contentType)
contentType
- The content typepublic F.Promise<WS.Response> get()
public F.Promise<WS.Response> post(java.lang.String body)
body
- represented as Stringpublic F.Promise<WS.Response> put(java.lang.String body)
body
- represented as Stringpublic F.Promise<WS.Response> post(org.codehaus.jackson.JsonNode body)
body
- represented as JSONpublic F.Promise<WS.Response> put(org.codehaus.jackson.JsonNode body)
body
- represented as JSONpublic F.Promise<WS.Response> post(java.io.InputStream body)
body
- represented as an InputStreampublic F.Promise<WS.Response> put(java.io.InputStream body)
body
- represented as an InputStreampublic F.Promise<WS.Response> post(java.io.File body)
body
- represented as a Filepublic F.Promise<WS.Response> put(java.io.File body)
body
- represented as a Filepublic F.Promise<WS.Response> delete()
public F.Promise<WS.Response> head()
public F.Promise<WS.Response> options()
public F.Promise<WS.Response> execute(java.lang.String method)
method
- The method to execute