| Modifier and Type | Method and Description |
|---|---|
Request |
build()
Constructs the immutable
Request instance. |
static RequestBuilder |
newRequest()
Creates a new builder instance.
|
RequestBuilder |
withBody(String body)
Add a JSON body to a PUT or POST request.
|
RequestBuilder |
withHeaders(Map<String,String> headers)
Sets the map of unencoded headers to be added to the request.
|
RequestBuilder |
withMethod(Method method)
Sets the HTTP method of the request.
|
RequestBuilder |
withParameters(Map<String,String> parameters)
Sets the map of unencoded querystring parameters to be added to the URL.
|
RequestBuilder |
withUrl(String url)
Sets the full URL of the resource.
|
public static RequestBuilder newRequest()
public Request build()
Request instance.public RequestBuilder withMethod(Method method)
method - HTTP method.public RequestBuilder withUrl(String url)
url - full URL excluding querystring parameters.public RequestBuilder withParameters(Map<String,String> parameters)
parameters - querystring parameters.public RequestBuilder withHeaders(Map<String,String> headers)
headers - request headers.public RequestBuilder withBody(String body)
body - JSON request body.Copyright © 2014. All Rights Reserved.