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
|
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 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 © 2023 flmelody. All rights reserved.