0

I need to make a client side http request to receive a string. I am struggling to find a method that works on the client.

I found WebClient.Get. But this one only works on the server. Threading it through opa's client/server communication is not an option because I need this to work, even if the server is down.

4

1 回答 1

0

出于安全原因,浏览器不允许跨域请求。见http://en.wikipedia.org/wiki/Same_origin_policy

在 HTML5 中计划了一些东西来克服这个问题(并且 Chrome 的 beta 版本支持网络客户端),但目前您需要使用服务器端功能。希望使用 Opa 很容易做到。

于 2012-07-01T20:51:03.510 回答