Error 400 (Bad Request) from Visual Studio 2015 Ripple

跟風遠走 提交于 2019-12-24 12:47:15

问题


I am trying to access as WCF service from Visual Studio's 2015 Android Ripple Emulator but I'm getting an error 400: Bad Request. I modified the proxy.js found in C:\Users\User\AppData\Roaming\npm\node_modules\vs-tac\node_modules\ripple-emulator\lib\server\proxy.js

from:

app.use(express.bodyParser());

to:

app.use(bodyParser.text({type: '*/*'}));

but this did not solve the problem and is trying to access the WCF service as follows - http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur…http%3A//example.com/Service.svc/GoodToGo%3Fmessage%3DOK

Has anyone managed to solve the issue (I did not manage after going through this thread - Expressjs raw body)


回答1:


You can avoid this error by disabling the web security.

  1. Close all Chrome instances.
  2. Open Chrome with the --disable-web-security argument.
  3. Run the app by Ripple.
  4. On the right panel of the page, click setting -> cross domain proxy, and set it to disable.
  5. Refresh the app and run.


来源:https://stackoverflow.com/questions/32762303/error-400-bad-request-from-visual-studio-2015-ripple

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!