public class StandaloneAhcWSRequest extends java.lang.Object implements StandaloneWSRequest
| Constructor and Description |
|---|
StandaloneAhcWSRequest(StandaloneAhcWSClient client,
java.lang.String url,
akka.stream.Materializer materializer) |
StandaloneAhcWSRequest(StandaloneAhcWSClient client,
java.lang.String url,
akka.stream.Materializer materializer,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
delete()
Perform a DELETE on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
execute()
Execute an arbitrary method on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
execute(java.lang.String method)
Execute an arbitrary method on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
get()
Perform a GET on the request asynchronously.
|
WSSignatureCalculator |
getCalculator() |
java.lang.String |
getContentType() |
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() |
long |
getRequestTimeout()
Gets the original request timeout in milliseconds, passed into the
request as input.
|
WSAuthScheme |
getScheme() |
java.lang.String |
getUrl() |
java.lang.String |
getUsername() |
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
head()
Perform a HEAD on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
options()
Perform an OPTIONS on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
patch(java.io.File body)
Perform a PATCH on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
patch(java.io.InputStream body)
Perform a PATCH on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
patch(com.fasterxml.jackson.databind.JsonNode body)
Perform a PATCH on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
patch(java.lang.String body)
Perform a PATCH on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
post(java.io.File body)
Perform a POST on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
post(java.io.InputStream body)
Perform a POST on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
post(com.fasterxml.jackson.databind.JsonNode body)
Perform a POST on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
post(java.lang.String body)
Perform a POST on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
put(java.io.File body)
Perform a PUT on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
put(java.io.InputStream body)
Perform a PUT on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
put(com.fasterxml.jackson.databind.JsonNode body)
Perform a PUT on the request asynchronously.
|
java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> |
put(java.lang.String body)
Perform a PUT on the request asynchronously.
|
StandaloneAhcWSRequest |
setAuth(java.lang.String userInfo)
Sets the authentication header for the current request using BASIC authentication.
|
StandaloneAhcWSRequest |
setAuth(java.lang.String username,
java.lang.String password)
Sets the authentication header for the current request using BASIC authentication.
|
StandaloneAhcWSRequest |
setAuth(java.lang.String username,
java.lang.String password,
WSAuthScheme scheme)
Sets the authentication header for the current request.
|
StandaloneAhcWSRequest |
setBody(java.io.File body)
Set the body this request should use.
|
StandaloneAhcWSRequest |
setBody(java.io.InputStream body)
Deprecated.
use
setBody(Source) instead. |
StandaloneAhcWSRequest |
setBody(com.fasterxml.jackson.databind.JsonNode body)
Set the body this request should use.
|
StandaloneAhcWSRequest |
setBody(java.lang.Object body)
Sets a body directly.
|
<U> StandaloneAhcWSRequest |
setBody(akka.stream.javadsl.Source<akka.util.ByteString,U> body)
Set the body this request should use.
|
StandaloneAhcWSRequest |
setBody(java.lang.String body)
Set the body this request should use.
|
StandaloneAhcWSRequest |
setContentType(java.lang.String contentType)
Set the content type.
|
StandaloneAhcWSRequest |
setFollowRedirects(boolean followRedirects)
Sets whether redirects (301, 302) should be followed automatically.
|
StandaloneAhcWSRequest |
setHeader(java.lang.String name,
java.lang.String value)
Sets a header with the given name, this can be called repeatedly.
|
StandaloneAhcWSRequest |
setMethod(java.lang.String method)
Sets the HTTP method this request should use, where the no args execute() method is invoked.
|
StandaloneAhcWSRequest |
setQueryParameter(java.lang.String name,
java.lang.String value)
Sets a query parameter with the given name, this can be called repeatedly.
|
StandaloneAhcWSRequest |
setQueryString(java.lang.String query)
Sets a query string
|
StandaloneAhcWSRequest |
setRequestFilter(WSRequestFilter filter)
Adds a request filter.
|
StandaloneAhcWSRequest |
setRequestTimeout(long timeout)
Sets the request timeout in milliseconds.
|
StandaloneAhcWSRequest |
setVirtualHost(java.lang.String virtualHost)
Sets the virtual host as a "hostname:port" string.
|
StandaloneAhcWSRequest |
sign(WSSignatureCalculator calculator)
Sets an (OAuth) signature calculator.
|
java.util.concurrent.CompletionStage<? extends StreamedResponse> |
stream()
Execute this request and stream the response body.
|
public StandaloneAhcWSRequest(StandaloneAhcWSClient client, java.lang.String url, akka.stream.Materializer materializer, com.fasterxml.jackson.databind.ObjectMapper mapper)
public StandaloneAhcWSRequest(StandaloneAhcWSClient client, java.lang.String url, akka.stream.Materializer materializer)
public StandaloneAhcWSRequest setRequestFilter(WSRequestFilter filter)
StandaloneWSRequestsetRequestFilter in interface StandaloneWSRequestfilter - a transforming filter.public StandaloneAhcWSRequest setHeader(java.lang.String name, java.lang.String value)
setHeader in interface StandaloneWSRequestname - the header namevalue - the header valuepublic StandaloneAhcWSRequest setQueryString(java.lang.String query)
setQueryString in interface StandaloneWSRequestquery - the query stringpublic StandaloneAhcWSRequest setQueryParameter(java.lang.String name, java.lang.String value)
StandaloneWSRequestsetQueryParameter in interface StandaloneWSRequestname - the query parameter namevalue - the query parameter valuepublic StandaloneAhcWSRequest setAuth(java.lang.String userInfo)
StandaloneWSRequestsetAuth in interface StandaloneWSRequestuserInfo - a string formed as "username:password".public StandaloneAhcWSRequest setAuth(java.lang.String username, java.lang.String password)
StandaloneWSRequestsetAuth in interface StandaloneWSRequestusername - the basic auth usernamepassword - the basic auth passwordpublic StandaloneAhcWSRequest setAuth(java.lang.String username, java.lang.String password, WSAuthScheme scheme)
StandaloneWSRequestsetAuth in interface StandaloneWSRequestusername - the usernamepassword - the passwordscheme - authentication schemepublic StandaloneAhcWSRequest sign(WSSignatureCalculator calculator)
StandaloneWSRequestsign in interface StandaloneWSRequestcalculator - the signature calculatorpublic StandaloneAhcWSRequest setFollowRedirects(boolean followRedirects)
StandaloneWSRequestsetFollowRedirects in interface StandaloneWSRequestfollowRedirects - true if the request should follow redirectspublic StandaloneAhcWSRequest setVirtualHost(java.lang.String virtualHost)
StandaloneWSRequestsetVirtualHost in interface StandaloneWSRequestvirtualHost - the virtual hostpublic StandaloneAhcWSRequest setRequestTimeout(long timeout)
StandaloneWSRequestsetRequestTimeout in interface StandaloneWSRequesttimeout - the request timeout in milliseconds. A value of -1 indicates an infinite request timeout.public StandaloneAhcWSRequest setContentType(java.lang.String contentType)
StandaloneWSRequestsetContentType in interface StandaloneWSRequestcontentType - The content typepublic java.lang.String getContentType()
getContentType in interface StandaloneWSRequestpublic StandaloneAhcWSRequest setMethod(java.lang.String method)
StandaloneWSRequestsetMethod in interface StandaloneWSRequestmethod - the HTTP method.public StandaloneAhcWSRequest setBody(java.lang.Object body)
body - the body as an unbound object.public StandaloneAhcWSRequest setBody(java.lang.String body)
StandaloneWSRequestsetBody in interface StandaloneWSRequestbody - the body of the request.public StandaloneAhcWSRequest setBody(com.fasterxml.jackson.databind.JsonNode body)
StandaloneWSRequestsetBody in interface StandaloneWSRequestbody - the body of the request.@Deprecated public StandaloneAhcWSRequest setBody(java.io.InputStream body)
setBody(Source) instead.setBody in interface StandaloneWSRequestbody - Deprecatedpublic StandaloneAhcWSRequest setBody(java.io.File body)
StandaloneWSRequestsetBody in interface StandaloneWSRequestbody - the body of the request.public <U> StandaloneAhcWSRequest setBody(akka.stream.javadsl.Source<akka.util.ByteString,U> body)
StandaloneWSRequestsetBody in interface StandaloneWSRequestbody - the body of the request.public java.lang.String getUrl()
getUrl in interface StandaloneWSRequestpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getHeaders()
getHeaders in interface StandaloneWSRequestpublic java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getQueryParameters()
getQueryParameters in interface StandaloneWSRequestpublic java.lang.String getUsername()
getUsername in interface StandaloneWSRequestpublic java.lang.String getPassword()
getPassword in interface StandaloneWSRequestpublic WSAuthScheme getScheme()
getScheme in interface StandaloneWSRequestpublic WSSignatureCalculator getCalculator()
getCalculator in interface StandaloneWSRequestpublic long getRequestTimeout()
StandaloneWSRequestgetRequestTimeout in interface StandaloneWSRequestpublic boolean getFollowRedirects()
getFollowRedirects in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> get()
StandaloneWSRequestget in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> patch(java.lang.String body)
StandaloneWSRequestpatch in interface StandaloneWSRequestbody - represented as Stringpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> patch(com.fasterxml.jackson.databind.JsonNode body)
StandaloneWSRequestpatch in interface StandaloneWSRequestbody - represented as JSONpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> patch(java.io.InputStream body)
StandaloneWSRequestpatch in interface StandaloneWSRequestbody - represented as an InputStreampublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> patch(java.io.File body)
StandaloneWSRequestpatch in interface StandaloneWSRequestbody - represented as a Filepublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> post(java.lang.String body)
StandaloneWSRequestpost in interface StandaloneWSRequestbody - represented as Stringpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> post(com.fasterxml.jackson.databind.JsonNode body)
StandaloneWSRequestpost in interface StandaloneWSRequestbody - represented as JSONpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> post(java.io.InputStream body)
StandaloneWSRequestpost in interface StandaloneWSRequestbody - represented as an InputStreampublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> post(java.io.File body)
StandaloneWSRequestpost in interface StandaloneWSRequestbody - represented as a Filepublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> put(java.lang.String body)
StandaloneWSRequestput in interface StandaloneWSRequestbody - represented as Stringpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> put(com.fasterxml.jackson.databind.JsonNode body)
StandaloneWSRequestput in interface StandaloneWSRequestbody - represented as JSONpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> put(java.io.InputStream body)
StandaloneWSRequestput in interface StandaloneWSRequestbody - represented as an InputStreampublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> put(java.io.File body)
StandaloneWSRequestput in interface StandaloneWSRequestbody - represented as a Filepublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> delete()
StandaloneWSRequestdelete in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> head()
StandaloneWSRequesthead in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> options()
StandaloneWSRequestoptions in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> execute(java.lang.String method)
StandaloneWSRequestexecute in interface StandaloneWSRequestmethod - The method to executepublic java.util.concurrent.CompletionStage<? extends StandaloneWSResponse> execute()
StandaloneWSRequestexecute in interface StandaloneWSRequestpublic java.util.concurrent.CompletionStage<? extends StreamedResponse> stream()
StandaloneWSRequeststream in interface StandaloneWSRequest