public class ClientRequestConfigurer extends Object
ClientRequest.
Needed because, unfortunately, ClientRequest does not seem to allow
the query string to be set directly (only
query parameters). Instead, it is
necessary to use its underlying
UriBuilderImpl.
| Modifier and Type | Method and Description |
|---|---|
ClientRequestConfigurer |
accept(javax.ws.rs.core.MediaType mediaType) |
ClientRequestConfigurer |
body(JsonRepresentation requestArgs)
|
ClientRequestConfigurer |
configureArgs(JsonRepresentation requestArgs)
Used when following links (
RestfulClient.follow(LinkRepresentation)). |
ClientRequestConfigurer |
configureArgs(Map<RestfulRequest.RequestParameter<?>,Object> args)
Used when creating a request with arguments to execute.
|
static ClientRequestConfigurer |
create(org.jboss.resteasy.client.ClientExecutor executor,
String uriTemplate) |
ClientRequestConfigurer |
header(String name,
String value) |
ClientRequestConfigurer |
queryArgs(JsonRepresentation requestArgs)
|
ClientRequestConfigurer |
queryString(JsonRepresentation requestArgs)
|
ClientRequestConfigurer |
setHttpMethod(RestfulHttpMethod httpMethod)
Prerequisite to
configureArgs(JsonRepresentation) or
configureArgs(Map). |
public static ClientRequestConfigurer create(org.jboss.resteasy.client.ClientExecutor executor, String uriTemplate)
public ClientRequestConfigurer accept(javax.ws.rs.core.MediaType mediaType)
public ClientRequestConfigurer header(String name, String value)
public ClientRequestConfigurer setHttpMethod(RestfulHttpMethod httpMethod)
configureArgs(JsonRepresentation) or
configureArgs(Map).public ClientRequestConfigurer configureArgs(Map<RestfulRequest.RequestParameter<?>,Object> args)
Typical flow is:
RestfulClient.createRequest(RestfulHttpMethod, String)
RestfulRequest.withArg(RequestParameter, Object) for each arg
RestfulRequest.execute() - which calls this method.
public ClientRequestConfigurer configureArgs(JsonRepresentation requestArgs)
RestfulClient.follow(LinkRepresentation)).public ClientRequestConfigurer body(JsonRepresentation requestArgs)
public ClientRequestConfigurer queryString(JsonRepresentation requestArgs)
public ClientRequestConfigurer queryArgs(JsonRepresentation requestArgs)
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.