facg3 / chemics

0 stars 1 forks source link

Inconsistent response types on post request #13

Open SamerElaila opened 6 years ago

SamerElaila commented 6 years ago

https://github.com/facg3/chemics/blob/cc6da16a2f605969bfaababa5abc402954321073/src/router.js#L35

you are returning html if there was an error, and json if it success.

and also the content-type of your response in case it success is text/html where the response is actually json , so you should change the content-type to application/json

see this link for more info

yahyaHB commented 6 years ago

noted ty