async-call-rpc

A lightweight JSON RPC client & server

Home > async-call-rpc > IsomorphicEncoder > encode

IsomorphicEncoder.encode() method

Encode the request or response object.

Signature:

encode(data: Requests | Responses): EncodedRequest | EncodedResponse | PromiseLike<EncodedRequest | EncodedResponse>;

Parameters

Parameter Type Description
data Requests | Responses The request or response object

Returns:

EncodedRequest | EncodedResponse | PromiseLike<EncodedRequest | EncodedResponse>