Skip to main content
Version: 5.x.x

URL Parameters

The types generated from the endpoint value string are extremely useful. Thanks to this, our request is able to suggest the required parameters to execute the query itself.


Example

const getUser = client.createRequest<ResponseType>()({
endpoint: "/users/:userId",
});

getUser.send({ params: { userId: 1 } });
// Or
getUser.setParams({ userId: 1 }).send();