Closed Kamrulhasan12345 closed 3 years ago
What are the request headers?
Content-type set to application/json.
As seen in the code, I understood that json() only parses while this header is added and unless it doesn't
@Kamrulhasan12345 should it be able to parse empty body then? it already expects to have JSON from you
@talentlessguy Thanks for making concept correct. Now I understood that my concept was wrong. Sorry for disturbing you.
Hi, While making a post request I gave the header as application/json but kept the body empty and and it resulted it
Unexpected end of JSON input
. Then I checked the code and saw that there is no handling if json body is''
. Probably you could add try catch for these errors.Hoping an early fix.