createEndpoint
createEndpoint<
Req,Res>(config):ApiEndpoint<Req,Res>
Defined in: wp-typia-api-client/src/client.ts:432
Freeze an endpoint configuration as a typed public contract.
Type Parameters
Section titled “Type Parameters”Req
Res
Parameters
Section titled “Parameters”config
Section titled “config”ApiEndpoint<Req, Res>
Endpoint metadata and validators to expose.
Returns
Section titled “Returns”ApiEndpoint<Req, Res>
The same config, preserved as an ApiEndpoint.
Example
Section titled “Example”const endpoint = createEndpoint({ method: "GET", path: "/wp-typia/v1/items", validateRequest, validateResponse,});