public static final class HttpRequest.RequestBuilder<R> extends Object
| Constructor and Description |
|---|
RequestBuilder(Class<R> returnType) |
RequestBuilder(HttpRequest<R> request) |
| Modifier and Type | Method and Description |
|---|---|
HttpRequest<R> |
build()
Builds the HttpRequest
|
HttpRequest.RequestBuilder<R> |
config(Config config)
Sets a client configuration to use with this session
|
HttpRequest.RequestBuilder<R> |
contentType(String contentType)
Overrides the default content type for the request
|
HttpRequest.RequestBuilder<R> |
endpoint(String endpoint) |
HttpRequest.RequestBuilder<R> |
endpointFunction(com.google.common.base.Function<String,String> endpointFunc)
A Function which allows manipulation of the endpoint depending on the service API utilizing it
|
HttpRequest.RequestBuilder<R> |
endpointTokenProvider(EndpointTokenProvider provider)
A Provider which will return the current Authorization Token
|
HttpRequest.RequestBuilder<R> |
entity(ModelEntity entity) |
HttpRequest.RequestBuilder<R> |
entity(Payload<?> entity) |
HttpRequest.RequestBuilder<R> |
header(String name,
Object value)
Adds a new Header to the request
|
HttpRequest.RequestBuilder<R> |
headers(Map<String,? extends Object> headers)
Pushes the Map of Headers into the existing headers for this request
|
HttpRequest.RequestBuilder<R> |
json(String json)
AdHoc JSON object to Post/Put
|
HttpRequest.RequestBuilder<R> |
method(HttpMethod method) |
HttpRequest.RequestBuilder<R> |
methodDelete()
Flags the request method as DELETE
|
HttpRequest.RequestBuilder<R> |
methodGet()
Flags the request method as GET
|
HttpRequest.RequestBuilder<R> |
methodPost()
Flags the request method as POST
|
HttpRequest.RequestBuilder<R> |
methodPut()
Flags the request method as PUT
|
HttpRequest.RequestBuilder<R> |
path(String path) |
HttpRequest.RequestBuilder<R> |
queryParam(String key,
Object value)
Adds a Key/Value based Query Param
|
HttpRequest.RequestBuilder<R> |
serviceType(ServiceType service)
The endpoint Service Type
|
HttpRequest.RequestBuilder<R> |
updateQueryParam(String key,
Object value)
Updates a Key/Value based Query Param
|
public RequestBuilder(HttpRequest<R> request)
public HttpRequest.RequestBuilder<R> endpoint(String endpoint)
HttpRequest.getEndpoint()public HttpRequest.RequestBuilder<R> path(String path)
HttpRequest.getPath()public HttpRequest.RequestBuilder<R> method(HttpMethod method)
HttpRequest.getMethod()public HttpRequest.RequestBuilder<R> endpointFunction(com.google.common.base.Function<String,String> endpointFunc)
endpointFunc - the function to modify the current endpoint into a resulting endpointpublic HttpRequest.RequestBuilder<R> methodPut()
public HttpRequest.RequestBuilder<R> methodGet()
public HttpRequest.RequestBuilder<R> methodDelete()
public HttpRequest.RequestBuilder<R> methodPost()
public HttpRequest.RequestBuilder<R> entity(ModelEntity entity)
HttpRequest.getEntity()public HttpRequest.RequestBuilder<R> entity(Payload<?> entity)
HttpRequest.getEntity()public HttpRequest.RequestBuilder<R> config(Config config)
public HttpRequest.RequestBuilder<R> headers(Map<String,? extends Object> headers)
headers - the headers to appendpublic HttpRequest.RequestBuilder<R> header(String name, Object value)
name - the header namevalue - the header valuepublic HttpRequest.RequestBuilder<R> serviceType(ServiceType service)
service - the service typepublic HttpRequest.RequestBuilder<R> queryParam(String key, Object value)
key - the keyvalue - the valuepublic HttpRequest.RequestBuilder<R> updateQueryParam(String key, Object value)
key - the keyvalue - the valuepublic HttpRequest.RequestBuilder<R> endpointTokenProvider(EndpointTokenProvider provider)
provider - the providerpublic HttpRequest.RequestBuilder<R> json(String json)
json - the JSON object in String formpublic HttpRequest.RequestBuilder<R> contentType(String contentType)
contentType - the content type to use in the requestpublic HttpRequest<R> build()
Copyright © 2017. All rights reserved.