Closed ahtd3 closed 2 years ago
Hey @ahtd3,
I do not see anything wrong regarding the wretch
code:
wretch()
.url("/")
.post("hello")
.text(console.log)
.catch(console.error)
I assume that the issue comes from the .net
code, so I will close the issue since it is not related to the library.
I'm new in wretch When using a post request with body, everything works fine to me
but if I want to send a string only (
.post(clientId)
) instead of creating a new model like above (post({ clientId })
)the backend responses a 415 response status code
here's what I defined to API endpoint in backend (using dotnet core)
so what was I wrong in my code? please give me any explain. thanks