Description
current implementation:
return {
buildUrl,
connect: makeMethodFn('CONNECT'),
delete: makeMethodFn('DELETE'),
.......
.......
} as Client;
It would be great to add getValidRequestBody (from '../core/utils.gen') just like buildUrl.
Reason: to be able to assemble all parts of a request when needed before executing the request itself.
For example, this is necessary if the code contains auto-filled fields that rely on serialization of the entire request body (for example, if a signature is performed using some algorithm).
This logic could, of course, be left in interceptors (client.interceptors.request.use(...) , but then
- the request would be implicitly modified.
- I would like to use autogenerated SDK methods so that the call is
type-safety and all auto-filled fields are explicitly filled