trait StandaloneWSRequest extends AnyRef
A WS Request builder.
- Alphabetic
- By Inheritance
- StandaloneWSRequest
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type Response <: StandaloneWSResponse
- abstract type Self <: StandaloneWSRequest { type Self = StandaloneWSRequest.this.Self }
Abstract Value Members
- abstract def auth: Option[(String, String, WSAuthScheme)]
The authentication this request should use
- abstract def body: WSBody
The body of this request
- abstract def calc: Option[WSSignatureCalculator]
A calculator of the signature for this request
- abstract def contentType: Option[String]
The content type for this request, if any is defined.
- abstract def cookies: Seq[WSCookie]
The cookies for this request
- abstract def delete(): Future[Response]
Perform a DELETE on the request asynchronously.
- abstract def execute(): Future[Response]
Execute this request
- abstract def execute(method: String): Future[Response]
Executes the given HTTP method.
Executes the given HTTP method.
- method
the HTTP method that will be executed
- returns
a future with the response for this request
- abstract def followRedirects: Option[Boolean]
Whether this request should follow redirects
- abstract def get(): Future[Response]
Performs a GET.
- abstract def head(): Future[Response]
Perform a HEAD on the request asynchronously.
- abstract def headers: Map[String, Seq[String]]
The headers for this request
- abstract def method: String
The method for this request
- abstract def options(): Future[Response]
Perform a OPTIONS on the request asynchronously.
- abstract def patch[T](body: T)(implicit arg0: BodyWritable[T]): Future[Response]
Performs a PATCH request.
Performs a PATCH request.
- body
the payload body submitted with this request
- returns
a future with the response for the PATCH request
- abstract def post[T](body: T)(implicit arg0: BodyWritable[T]): Future[Response]
Performs a POST request.
Performs a POST request.
- body
the payload body submitted with this request
- returns
a future with the response for the POST request
- abstract def proxyServer: Option[WSProxyServer]
The proxy server this request will use
- abstract def put[T](body: T)(implicit arg0: BodyWritable[T]): Future[Response]
Performs a PUT request.
Performs a PUT request.
- body
the payload body submitted with this request
- returns
a future with the response for the PUT request
- abstract def queryString: Map[String, Seq[String]]
The query string for this request
- abstract def requestTimeout: Option[Duration]
The timeout for the request
- abstract def sign(calc: WSSignatureCalculator): Self
sets the signature calculator for the request
sets the signature calculator for the request
- calc
the signature calculator
- abstract def stream(): Future[Response]
Execute this request and stream the response body.
- abstract def uri: URI
The URI for this request
- abstract def url: String
The base URL for this request
- abstract def virtualHost: Option[String]
The virtual host this request will use
- abstract def withAuth(username: String, password: String, scheme: WSAuthScheme): Self
sets the authentication realm
- abstract def withBody[T](body: T)(implicit arg0: BodyWritable[T]): Self
Sets the body for this request.
- abstract def withCookies(cookies: WSCookie*): Self
Returns this request with the given cookies, discarding the existing ones.
Returns this request with the given cookies, discarding the existing ones. In general, cookies set on a request are used only on that request and then discarded. But when
play.ws.ahc.useCookieStoreis enabled, there will be a global cookie store that keeps cookies between requests.- cookies
the cookies to be used
- abstract def withDisableUrlEncoding(disableUrlEncoding: Boolean): Self
Sets whether url encoding should be disabled
- abstract def withFollowRedirects(follow: Boolean): Self
Sets whether redirects (301, 302) should be followed automatically
- abstract def withHttpHeaders(headers: (String, String)*): Self
Returns this request with the given headers, discarding the existing ones.
Returns this request with the given headers, discarding the existing ones.
- headers
the headers to be used
- abstract def withMethod(method: String): Self
Sets the method for this request
- abstract def withProxyServer(proxyServer: WSProxyServer): Self
Sets the proxy server to use in this request
- abstract def withQueryStringParameters(parameters: (String, String)*): Self
Returns this request with the given query string parameters, discarding the existing ones.
Returns this request with the given query string parameters, discarding the existing ones.
- parameters
the query string parameters
- abstract def withRequestFilter(filter: WSRequestFilter): Self
Adds a filter to the request that can transform the request for subsequent filters.
- abstract def withRequestTimeout(timeout: Duration): Self
Sets the maximum time you expect the request to take.
Sets the maximum time you expect the request to take. Use Duration.Inf to set an infinite request timeout. Warning: a stream consumption will be interrupted when this time is reached unless Duration.Inf is set.
- abstract def withUrl(url: String): Self
Sets the url for this request.
- abstract def withVirtualHost(vh: String): Self
Sets the virtual host to use in this request
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addCookies(cookies: WSCookie*): Self
Returns this request with the given query string parameters, preserving the existing ones.
Returns this request with the given query string parameters, preserving the existing ones.
- cookies
the cookies to be used
- def addHttpHeaders(hdrs: (String, String)*): Self
Returns this request with the given headers, preserving the existing ones.
Returns this request with the given headers, preserving the existing ones.
- hdrs
the headers to be added
- def addQueryStringParameters(parameters: (String, String)*): Self
Returns this request with the given query string parameters, preserving the existing ones.
Returns this request with the given query string parameters, preserving the existing ones.
- parameters
the query string parameters
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def header(name: String): Option[String]
Get the value of the header with the specified name.
Get the value of the header with the specified name. If there are more than one values for this header, the first value is returned. If there are no values, than a None is returned.
- name
the header name
- returns
the header value
- def headerValues(name: String): Seq[String]
Get all the values of header with the specified name.
Get all the values of header with the specified name. If there are no values for the header with the specified name, than an empty sequence is returned.
- name
the header name.
- returns
all the values for this header name.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)