public final class RestRequest extends Object
RestCallUtil.| Modifier and Type | Class and Description |
|---|---|
static class |
RestRequest.Builder
Builder to build
RestRequest. |
| Modifier and Type | Method and Description |
|---|---|
static RestRequest.Builder |
builder()
Creates builder to build
RestRequest. |
static RestRequest.Builder |
builderFrom(RestRequest restRequest)
Creates a builder to build
RestRequest and initialize it with the given object. |
String |
buildPathWithPathParams()
Builds the path that will be used by this request including the path parameters.
|
String |
buildURI()
Builds the full URL that will be used to send this request, including the basePath, the path
with the injected path parameters and the query parameters.
|
String |
getBasePath()
The base path of the request with probably the protocol, hostname and optionally the port.
|
Map<String,String> |
getHeaders()
The headers of the rest request.
|
org.everit.http.client.HttpMethod |
getMethod()
Method of the rest request.
|
String |
getPath()
Path of the rest request.
|
Map<String,String> |
getPathParams()
Path parameters that will be injected within
#path(String). |
Map<String,Collection<String>> |
getQueryParams()
Query parameters that will be appended after the path.
|
Optional<?> |
getRequestBody()
Optional body of the request.
|
@Generated(value="SparkTools") public static RestRequest.Builder builder()
RestRequest.@Generated(value="SparkTools") public static RestRequest.Builder builderFrom(RestRequest restRequest)
RestRequest and initialize it with the given object.restRequest - to initialize the builder withpublic String buildPathWithPathParams()
public String buildURI()
public String getBasePath()
public org.everit.http.client.HttpMethod getMethod()
HttpMethod.GETpublic String getPath()
public Map<String,String> getPathParams()
#path(String).public Map<String,Collection<String>> getQueryParams()
public Optional<?> getRequestBody()
AsyncContentProvider it is be used as is, otherwise Jackson is used to convert the
object to a JSON String.Copyright © 2011–2019 Everit Kft.. All rights reserved.