restyped-axios
restyped-axios copied to clipboard
Why the optional '?' type operator for PUT POST, PATCH data?
The second parameter of the TypedAxiosInstance post(...)
, put(...)
and patch(...)
methods is always optional now. I would expect giving a body argument to be mandatory.
If I want the body to be optional (for whatever reason), I could still define MyObject | undefined
in my API body, and give undefined
as second argument to the functions.