来自 Visual Studio 2015 Ripple 的错误 400(错误请求)
Error 400 (Bad Request) from Visual Studio 2015 Ripple
我正在尝试从 Visual Studio 的 2015 Android Ripple Emulator 作为 WCF 服务访问,但我收到错误 400:错误请求。我修改了在C:\Users\User\AppData\Roaming\npm\node_modules\vs-tac\node_modules\ripple-emulator\lib\server\proxy.js
中找到的proxy.js
来自:
app.use(express.bodyParser());
至:
app.use(bodyParser.text({type: '*/*'}));
但这并没有解决问题,并且正在尝试按如下方式访问 WCF 服务 - http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur…http%3A//example.com/Service.svc/GoodToGo%3Fmessage% 3DOK
有没有人设法解决这个问题(我在完成这个线程后没有解决 - Expressjs raw body)
您可以通过禁用网络安全来避免此错误。
- 关闭所有 Chrome 个实例。
- 使用
--disable-web-security
参数打开 Chrome。
- 运行 Ripple 的应用程序。
- 在页面的右侧面板上,单击
setting -> cross domain proxy
,并将其设置为 disable
。
- 刷新应用程序并运行。
我正在尝试从 Visual Studio 的 2015 Android Ripple Emulator 作为 WCF 服务访问,但我收到错误 400:错误请求。我修改了在C:\Users\User\AppData\Roaming\npm\node_modules\vs-tac\node_modules\ripple-emulator\lib\server\proxy.js
中找到的proxy.js来自:
app.use(express.bodyParser());
至:
app.use(bodyParser.text({type: '*/*'}));
但这并没有解决问题,并且正在尝试按如下方式访问 WCF 服务 - http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rur…http%3A//example.com/Service.svc/GoodToGo%3Fmessage% 3DOK
有没有人设法解决这个问题(我在完成这个线程后没有解决 - Expressjs raw body)
您可以通过禁用网络安全来避免此错误。
- 关闭所有 Chrome 个实例。
- 使用
--disable-web-security
参数打开 Chrome。 - 运行 Ripple 的应用程序。
- 在页面的右侧面板上,单击
setting -> cross domain proxy
,并将其设置为disable
。 - 刷新应用程序并运行。