-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] data
for POST request is optional
#171
Comments
Thank you for opening this issue, |
I need to investigate more but I'm using a library to extract [err, result] from async ops and specifically with zod POST endpoints it's returning a different type, forcing me to use |
Now, thinking about it again, wouldn't it be better if the POST endpoints instead of accepting body as the first parameter, did like the GET endpoints with a single object(so body would be a property of this object)? |
yes, this is maybe a disgn mistake on my part. it makes things harder to implement and also harder to autocomplete. In the mean time i'll try to first fix the reported bug. |
Well, major releases are expected to introduce breaking changes :) |
Hello @QzCurious, Just to keep you informed that i found a way to handle this. it's not really pretty, but works. |
fixed in
|
I've define a body parameter for my post request. But I can ignore
data
without ts showing error.codesandbox
The text was updated successfully, but these errors were encountered: