interface BodyCodec<T : Any>
A codec for encoding and decoding HTTP bodies.
Author
Julien Viet
open static fun buffer(): BodyCodec<Buffer> |
|
abstract fun create(handler: Handler<AsyncResult<BodyStream<T>>>): Unit
Create the BodyStream. This method is usually called for creating the pump for the HTTP response and should not be called directly. open static fun <T : Any> create(decode: Function<Buffer, T>): BodyCodec<T>
Create a codec that buffers the entire body and then apply the |
|
open static fun <U : Any> json(type: Class<U>): BodyCodec<U>
Create and return a codec for Java objects encoded using Jackson mapper. |
|
open static fun jsonArray(): BodyCodec<JsonArray> |
|
open static fun jsonObject(): BodyCodec<JsonObject> |
|
open static fun none(): BodyCodec<Void> |
|
open static fun pipe(stream: WriteStream<Buffer>): BodyCodec<Void>
A body codec that pipes the body to a write stream. |
|
open static fun string(): BodyCodec<String>open static fun string(encoding: String): BodyCodec<String>
A codec for strings using a specific |