public interface Parser
Modifier and Type | Field and Description |
---|---|
static Parser |
RAW
Parse body to one of the
raw types: String, byte[], etc. |
static Parser |
UNSUPPORTED_MEDIA_TYPE
Resolve parsing as
StatusCode.UNSUPPORTED_MEDIA_TYPE . |
Modifier and Type | Method and Description |
---|---|
<T> T |
parse(Context ctx,
Type type)
Parse HTTP body into the given type.
|
static final Parser UNSUPPORTED_MEDIA_TYPE
StatusCode.UNSUPPORTED_MEDIA_TYPE
.static final Parser RAW
raw
types: String, byte[], etc.@Nonnull <T> T parse(@Nonnull Context ctx, @Nonnull Type type) throws Exception
T
- Dynamic binding of the target type.ctx
- Web context.type
- Target/expected type.Exception
- Is something goes wrong.Copyright © 2019. All rights reserved.