Closed Aarbel closed 5 years ago
Hey @Aarbel,
If your 204 response does not contain a body, then calling .json()
is indeed expected to throw.
You can try using .res()
to retrieve the raw fetch response instead:
wretch()
.url('/toto/65465874')
.options({ credentials: 'include' })
.delete()
.res(); // <--
I hop this will solve your issue 😉.
Yes i just remove the .json() part and that works ! Thanks a lot for your help !
I've got this error with wretch and 204 response with no json in the response. How could i fix it ? Thanks a lot !
SyntaxError: Unexpected end of JSON input at eval
My code :