public interface MessageDecoder
Modifier and Type | Field and Description |
---|---|
static MessageDecoder |
RAW
Parse body to one of the
raw types: String, byte[], etc. |
static MessageDecoder |
UNSUPPORTED_MEDIA_TYPE
Resolve parsing as
StatusCode.UNSUPPORTED_MEDIA_TYPE . |
Modifier and Type | Method and Description |
---|---|
<T> T |
decode(Context ctx,
Type type)
Parse HTTP body into the given type.
|
static final MessageDecoder UNSUPPORTED_MEDIA_TYPE
StatusCode.UNSUPPORTED_MEDIA_TYPE
.static final MessageDecoder RAW
raw
types: String, byte[], etc.@Nonnull <T> T decode(@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.