play.libs
Class WS.WSRequest

java.lang.Object
  extended by com.ning.http.client.RequestBuilderBase<WS.WSRequest>
      extended by play.libs.WS.WSRequest
Enclosing class:
WS

public static class WS.WSRequest
extends com.ning.http.client.RequestBuilderBase<WS.WSRequest>

Provides the bridge between Play and the underlying ning request


Field Summary
 
Fields inherited from class com.ning.http.client.RequestBuilderBase
request, useRawUrl
 
Constructor Summary
WS.WSRequest(java.lang.String method)
           
 
Method Summary
 WS.WSRequest addHeader(java.lang.String name, java.lang.String value)
          Add an HTTP header (used for headers with mutiple values).
 F.Promise<WS.Response> execute()
           
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllHeaders()
          Return the headers of the request being constructed
 java.util.List<java.lang.String> getHeader(java.lang.String name)
           
 java.lang.String getMethod()
           
 java.lang.String getUrl()
           
 WS.WSRequest setHeader(java.lang.String name, java.lang.String value)
          Set an HTTP header.
 WS.WSRequest setHeaders(com.ning.http.client.FluentCaseInsensitiveStringsMap hdrs)
          Defines the request headers.
 WS.WSRequest setHeaders(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> hdrs)
          Defines the request headers.
 WS.WSRequest setUrl(java.lang.String url)
           
 
Methods inherited from class com.ning.http.client.RequestBuilderBase
addBodyPart, addCookie, addOrReplaceCookie, addParameter, addQueryParameter, build, setBody, setBody, setBody, setBody, setBody, setBody, setBody, setBodyEncoding, setConnectionPoolKeyStrategy, setContentLength, setFollowRedirects, setInetAddress, setLocalInetAddress, setMethod, setParameters, setParameters, setPerRequestConfig, setProxyServer, setQueryParameters, setRangeOffset, setRealm, setVirtualHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WS.WSRequest

public WS.WSRequest(java.lang.String method)
Method Detail

setHeader

public WS.WSRequest setHeader(java.lang.String name,
                              java.lang.String value)
Set an HTTP header.

Overrides:
setHeader in class com.ning.http.client.RequestBuilderBase<WS.WSRequest>

addHeader

public WS.WSRequest addHeader(java.lang.String name,
                              java.lang.String value)
Add an HTTP header (used for headers with mutiple values).

Overrides:
addHeader in class com.ning.http.client.RequestBuilderBase<WS.WSRequest>

setHeaders

public WS.WSRequest setHeaders(com.ning.http.client.FluentCaseInsensitiveStringsMap hdrs)
Defines the request headers.

Overrides:
setHeaders in class com.ning.http.client.RequestBuilderBase<WS.WSRequest>

setHeaders

public WS.WSRequest setHeaders(java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> hdrs)
Defines the request headers.

Overrides:
setHeaders in class com.ning.http.client.RequestBuilderBase<WS.WSRequest>

getAllHeaders

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllHeaders()
Return the headers of the request being constructed


getHeader

public java.util.List<java.lang.String> getHeader(java.lang.String name)

getMethod

public java.lang.String getMethod()

setUrl

public WS.WSRequest setUrl(java.lang.String url)
Overrides:
setUrl in class com.ning.http.client.RequestBuilderBase<WS.WSRequest>

getUrl

public java.lang.String getUrl()

execute

public F.Promise<WS.Response> execute()