Libraries
    Preparing search index...

    Interface ContentTypeHandler

    A pluggable serializer/deserializer for a specific MIME type. Register instances with ServerBuilder.contentType() or ContentNegotiator.register() to extend content negotiation.

    const msgpackHandler: ContentTypeHandler = {
    mimeType: 'application/msgpack',
    serialize: (value) => encode(value),
    deserialize: (raw) => decode(Buffer.from(raw))
    };
    server.contentType(msgpackHandler);
    interface ContentTypeHandler {
        mimeType: string;
        deserialize(raw: string): unknown;
        serialize(value: unknown): string;
    }
    Index

    Properties

    Methods

    Properties

    mimeType: string

    Methods