public class WindwardRequest extends Object implements RequestReader
| Modifier and Type | Class and Description |
|---|---|
static class |
WindwardRequest.WindwardRequestBuilder
Builder for WindwardRequest
|
| Modifier and Type | Method and Description |
|---|---|
<I> I |
bindJson(String body,
Class<I> clazz,
Class<?>... groups)
Bind request body to specific class.
|
<I> I |
bindJson(String body,
Type type,
Class<?>... groups)
Bind request body to specific type.
|
List<String> |
getHeader(String name)
Return request header
|
Map<String,List<String>> |
getHeaders()
Return all request headers
|
String |
getMethod()
Get request methods name
|
Map<String,Object> |
getPathVariables()
Get path variables
|
Map<String,List<String>> |
getQuerystring()
Get request querystring
|
String |
getRequestBody()
Get request body
|
String |
getUri()
Request uri
|
static WindwardRequest.WindwardRequestBuilder |
newBuild() |
<I> I |
readJson(String body,
Class<I> clazz)
Read request body into new object possibly
|
<I> I |
readJson(String body,
Type type)
Read request body into new object possibly
|
public static WindwardRequest.WindwardRequestBuilder newBuild()
public String getMethod()
public List<String> getHeader(String name)
name - headers namepublic Map<String,List<String>> getHeaders()
public String getUri()
public Map<String,List<String>> getQuerystring()
public Map<String,Object> getPathVariables()
public String getRequestBody()
public <I> I readJson(String body, Class<I> clazz)
readJson in interface RequestReaderI - objects typebody - json stringclazz - objects classpublic <I> I readJson(String body, Type type)
readJson in interface RequestReaderI - objects typebody - json stringtype - objects typepublic <I> I bindJson(String body, Class<I> clazz, Class<?>... groups)
bindJson in interface RequestReaderI - objects typebody - json stringclazz - objects classgroups - validate grouppublic <I> I bindJson(String body, Type type, Class<?>... groups)
bindJson in interface RequestReaderI - objects typebody - json stringtype - objects typegroups - validate groupCopyright © 2024 flmelody. All rights reserved.