Interface Request
- All Known Implementing Classes:
SimpleRequest
public interface Request
Implementation-agnostic representation of a HTTP request
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Deprecated.Get the content-type header of this request, if it has been set.Get the collection of headers on this request.getHeaderValue(String name) Get the first of header value for the header param with the given name (if any exist).getHeaderValues(String name) Get the collection of header values for the header param with the given name.getPath()Get the collection of query parameter values for the query param with the given name.
-
Method Details
-
getPath
- Returns:
- the request path
-
getMethod
- Returns:
- the HTTP request method ("GET", "PUT" etc.)
-
getBody
Deprecated.usegetRequestBody(). This method will be removed in a future release.- Returns:
- the request body as
String
-
getRequestBody
- Returns:
- the request body
-
getQueryParameters
- Returns:
- the collection of query parameter names present on this request
-
getQueryParameterValues
Get the collection of query parameter values for the query param with the given name.- Parameters:
name- The name of the parameter to retrieve. If not differently specified this name is case insensitive.- Returns:
- The query parameter values for that param; or empty list
-
getHeaders
Get the collection of headers on this request.Result will include key and all values (in the case of multiple headers with the same key)
- Returns:
- The map of
key->valuesfor the headers associated with this request.
-
getHeaderValues
Get the collection of header values for the header param with the given name.- Parameters:
name- The (case insensitive) name of the parameter to retrieve- Returns:
- The header values for that param; or empty list
-
getHeaderValue
Get the first of header value for the header param with the given name (if any exist).- Parameters:
name- The (case insensitive) name of the parameter to retrieve- Returns:
- The first header value for that param (if it exists)
-
getContentType
Get the content-type header of this request, if it has been set.- Returns:
- The content-type header, or empty if it has not been set.
-
getRequestBody().