I had a react js application (http://localhost:3000) that invoked a web API (http://xyz) POST method. The way I accomplished that is - through the "proxy": "http://xyz" setting in the package.json of the http://localhost:3000 react js application. When I moved the react js application comp to Sitecore JSS, the call isn't successful - xhr.js:155

GET http://new-jss-app.dev.local/sitecore/service/notfound.aspx?item=%2fapilist%2fsignin&user=extranet%5cAnonymous&site=new-jss-app

Any pointers to help accomplish the call? Thanks.....


Might help someone in the future. The call from the sc instance of JSS had request method: OPTION instead of POST (as in the call from the JSS connected local to the web API). So, modified the web API's web.config and global.asax to take care of the preflight request. this way got rid of the proxy setting in the react's package.json too.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.