A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.

interface $ClientProtocol<Request, Response> {
    deserializeResponse<Output>(operationSchema, context, response): Promise<Output>;
    getPayloadCodec(): $Codec<any, any>;
    getRequestType(): (new (...args) => Request);
    getResponseType(): (new (...args) => Response);
    getShapeId(): string;
    serializeRequest<Input>(operationSchema, input, context): Promise<Request>;
    setSerdeContext(serdeContext): void;
    updateServiceEndpoint(request, endpoint): Request;
}

Type Parameters

  • Request

  • Response

Hierarchy (view full)

Methods

  • Returns $Codec<any, any>

    the payload codec if the requests/responses have a symmetric format. It otherwise may return null.

  • Returns (new (...args) => Request)

  • Returns string

    the Smithy qualified shape id.