|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.libs.WS.WSRequest
public abstract static class WS.WSRequest
Field Summary | |
---|---|
java.lang.String |
body
|
WS.FileParam[] |
fileParams
|
java.util.Map<java.lang.String,java.lang.String> |
headers
|
java.lang.String |
mimeType
|
OAuth.ServiceInfo |
oauthInfo
|
OAuth.TokenPair |
oauthTokens
|
java.util.Map<java.lang.String,java.lang.Object> |
parameters
|
java.lang.String |
password
|
java.lang.Integer |
timeout
|
java.lang.String |
url
|
java.lang.String |
username
|
Constructor Summary | |
---|---|
WS.WSRequest()
|
|
WS.WSRequest(java.lang.String url)
|
Method Summary | |
---|---|
WS.WSRequest |
authenticate(java.lang.String username,
java.lang.String password)
define client authentication for a server host provided credentials will be used during the request |
WS.WSRequest |
body(java.lang.Object body)
Add the given body to the request. |
protected java.lang.String |
createQueryString()
|
abstract WS.HttpResponse |
delete()
Execute a DELETE request. |
java.util.concurrent.Future<WS.HttpResponse> |
deleteAsync()
Execute a DELETE request asynchronously. |
WS.WSRequest |
files(java.io.File... files)
Add files to request. |
WS.WSRequest |
files(WS.FileParam... fileParams)
Add fileParams aka File and Name parameter to the request. |
abstract WS.HttpResponse |
get()
Execute a GET request synchronously. |
java.util.concurrent.Future<WS.HttpResponse> |
getAsync()
Execute a GET request asynchronously. |
abstract WS.HttpResponse |
head()
Execute a HEAD request. |
java.util.concurrent.Future<WS.HttpResponse> |
headAsync()
Execute a HEAD request asynchronously. |
WS.WSRequest |
headers(java.util.Map<java.lang.String,java.lang.String> headers)
Use the provided headers when executing request. |
WS.WSRequest |
mimeType(java.lang.String mimeType)
Add a MimeType to the web service request. |
WS.WSRequest |
oauth(OAuth.ServiceInfo oauthInfo,
OAuth.TokenPair oauthTokens)
Sign the request for do a call to a server protected by oauth |
abstract WS.HttpResponse |
options()
Execute a OPTIONS request. |
java.util.concurrent.Future<WS.HttpResponse> |
optionsAsync()
Execute a OPTIONS request asynchronously. |
WS.WSRequest |
params(java.util.Map<java.lang.String,java.lang.Object> parameters)
Add parameters to request. |
abstract WS.HttpResponse |
post()
Execute a POST request. |
java.util.concurrent.Future<WS.HttpResponse> |
postAsync()
Execute a POST request asynchronously. |
abstract WS.HttpResponse |
put()
Execute a PUT request. |
java.util.concurrent.Future<WS.HttpResponse> |
putAsync()
Execute a PUT request asynchronously. |
WS.WSRequest |
setHeader(java.lang.String name,
java.lang.String value)
Add a header to the request |
WS.WSRequest |
setParameter(java.lang.String name,
java.lang.Object value)
|
WS.WSRequest |
setParameter(java.lang.String name,
java.lang.String value)
Add a parameter to the request |
WS.WSRequest |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Add parameters to request. |
abstract WS.HttpResponse |
trace()
Execute a TRACE request. |
java.util.concurrent.Future<WS.HttpResponse> |
traceAsync()
Execute a TRACE request asynchronously. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String url
public java.lang.String username
public java.lang.String password
public java.lang.String body
public WS.FileParam[] fileParams
public java.util.Map<java.lang.String,java.lang.String> headers
public java.util.Map<java.lang.String,java.lang.Object> parameters
public java.lang.String mimeType
public java.lang.Integer timeout
public OAuth.ServiceInfo oauthInfo
public OAuth.TokenPair oauthTokens
Constructor Detail |
---|
public WS.WSRequest()
public WS.WSRequest(java.lang.String url)
Method Detail |
---|
public WS.WSRequest mimeType(java.lang.String mimeType)
mimeType
-
public WS.WSRequest authenticate(java.lang.String username, java.lang.String password)
username
- password
- public WS.WSRequest oauth(OAuth.ServiceInfo oauthInfo, OAuth.TokenPair oauthTokens)
public WS.WSRequest files(java.io.File... files)
files
-
public WS.WSRequest files(WS.FileParam... fileParams)
fileParams
-
public WS.WSRequest body(java.lang.Object body)
body
-
public WS.WSRequest setHeader(java.lang.String name, java.lang.String value)
name
- header namevalue
- header value
public WS.WSRequest setParameter(java.lang.String name, java.lang.String value)
name
- parameter namevalue
- parameter value
public WS.WSRequest setParameter(java.lang.String name, java.lang.Object value)
public WS.WSRequest headers(java.util.Map<java.lang.String,java.lang.String> headers)
headers
-
public WS.WSRequest params(java.util.Map<java.lang.String,java.lang.Object> parameters)
public WS.WSRequest setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
public abstract WS.HttpResponse get()
public java.util.concurrent.Future<WS.HttpResponse> getAsync()
public abstract WS.HttpResponse post()
public java.util.concurrent.Future<WS.HttpResponse> postAsync()
public abstract WS.HttpResponse put()
public java.util.concurrent.Future<WS.HttpResponse> putAsync()
public abstract WS.HttpResponse delete()
public java.util.concurrent.Future<WS.HttpResponse> deleteAsync()
public abstract WS.HttpResponse options()
public java.util.concurrent.Future<WS.HttpResponse> optionsAsync()
public abstract WS.HttpResponse head()
public java.util.concurrent.Future<WS.HttpResponse> headAsync()
public abstract WS.HttpResponse trace()
public java.util.concurrent.Future<WS.HttpResponse> traceAsync()
protected java.lang.String createQueryString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |