Can't send a post request when the 'Content-Type' is set to 'application/json'
问题 I am working on a React application and I am using fetch to send a request. I have made a Sign Up form recently and now I am integrating it with it's API. Previously the API accepted url encoded data and it was all working fine. but now that the requirement has changed and the API accepts data in JSON, I had to change the content-type header from 'application/x-www-form-urlencoded' to 'application/json'. But I get the following error: Fetch API cannot load http://local.moberries.com/api/v1