public interface HttpRequestResponse
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String key,
java.lang.String value)
Add a value to a header.
|
void |
addQueryParam(java.lang.String key,
java.lang.String value)
Add a new value to the query parameter.
|
HttpRequestResponse |
copy()
Create a new HttpRequestResponse containing deep copies of this object's
values.
|
com.fasterxml.jackson.databind.JsonNode |
getBody()
Get the parsed JSON body of the request/response.
|
java.util.List<java.lang.String> |
getHeader(java.lang.String key)
Get the values of a header provided to this request/response.
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getHeaders()
Get a copy of the headers provided to this request/response.
|
java.lang.String |
getHeaderString(java.lang.String key)
Get the value of a header provided to this request/response.
|
java.util.List<java.lang.String> |
getQueryParam(java.lang.String key)
Get the value(s) of a specific query parameter.
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getQueryParams()
Get the request's query parameters parsed as a map.
|
java.net.URI |
getUrl()
Get the URL that this request is pointed at, or null if a response.
|
java.lang.String |
getUrlString()
Get the URL that this request is pointed at, formatted as a string, or
null if a response.
|
void |
setBody(com.fasterxml.jackson.databind.JsonNode body)
Set the contents of the request/response body.
|
void |
setHeader(java.lang.String key,
java.util.List<java.lang.String> value)
Set the value of a header to multiple values.
|
void |
setHeader(java.lang.String key,
java.lang.String value)
Set the value of a header to a single value.
|
void |
setHeaders(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers)
Set the request or response headers.
|
void |
setQueryParam(java.lang.String key,
java.util.List<java.lang.String> values)
Set the value(s) of a specific query parameter.
|
void |
setQueryParam(java.lang.String key,
java.lang.String value)
Set a specific query parameter to a single value.
|
void |
setQueryParams(java.util.Map<java.lang.String,java.util.List<java.lang.String>> params)
Set the query parameters of this request.
|
void |
setQueryParams(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> params)
Set the query parameters of this request.
|
void |
setUrl(java.net.URI url)
Set this request's URL.
|
java.net.URI getUrl()
java.lang.String getUrlString()
void setUrl(java.net.URI url)
url
- The request URL.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getQueryParams()
java.util.List<java.lang.String> getQueryParam(java.lang.String key)
key
- The query parameter to look up.void setQueryParams(java.util.Map<java.lang.String,java.util.List<java.lang.String>> params) throws java.net.URISyntaxException
params
- The parameters to provide.java.net.URISyntaxException
- If the query parameters cannot be formatted.void setQueryParams(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> params) throws java.net.URISyntaxException
params
- The parameters to provide.java.net.URISyntaxException
- If the query parameters cannot be formatted.void setQueryParam(java.lang.String key, java.util.List<java.lang.String> values) throws java.net.URISyntaxException
key
- The parameter to set.values
- The values to set the parameter to.java.net.URISyntaxException
- If the query parameters cannot be formatted.void setQueryParam(java.lang.String key, java.lang.String value) throws java.net.URISyntaxException
key
- The parameter to set.value
- The value to set the parameter to.java.net.URISyntaxException
- If the query parameters cannot be formatted.void addQueryParam(java.lang.String key, java.lang.String value) throws java.net.URISyntaxException
key
- The parameter to set.value
- The value to set the parameter to.java.net.URISyntaxException
- If the query parameters cannot be formatted.javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
java.util.List<java.lang.String> getHeader(java.lang.String key)
key
- The header to retrieve.java.lang.String getHeaderString(java.lang.String key)
key
- The header to retrieve.void setHeaders(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers)
headers
- The headers to set.void setHeader(java.lang.String key, java.lang.String value)
key
- The header to set.value
- The header value to set.void setHeader(java.lang.String key, java.util.List<java.lang.String> value)
key
- The header to set.value
- The header values to set.void addHeader(java.lang.String key, java.lang.String value)
key
- The header to modify.value
- The value to add.com.fasterxml.jackson.databind.JsonNode getBody()
void setBody(com.fasterxml.jackson.databind.JsonNode body)
body
- The request or response body.HttpRequestResponse copy()