跨域http获取请求...我需要代理吗? [英] Cross Domain http get request... Do I need Proxy?

查看:72
本文介绍了跨域http获取请求...我需要代理吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我只是想从http get请求中获取结果到另一个域网页.这是我对请求的javascript功能:

Hi,
I just trying to get a result from a http get request to another domain webpage. Here is my javascript funtion for the request:

function pegaCEP() {<br />          wRequest.set_url(''http://cep.republicavirtual.com.br/web_cep.php?cep=13026075'');<br />          wRequest.set_httpVerb("GET");<br />          wRequest.add_completed(completed);<br />          wRequest.invoke();<br />      }<br />


如果我在同一站点中的网页上使用set_url,则可以正常工作,否则将为空白(不被拒绝,只是空的,没有错误).我四处张望,看到了一些有关代理的信息...我需要代理吗?如果是这样,您能告诉我怎么做吗?如果没有,是否有任何web.config解决方案?


If I use set_url for a webpage in the same site, it works fine, otherwise it cames blank (not denied, just empty, no error). I was looking around and saw something about proxy... Do I need proxy here? If so, can you tell how to do it? If not, is there any web.config solution or something?

推荐答案

^ ]是有关该主题的博客文章.

Here[^] is a blog post on the subject.


这篇关于跨域http获取请求...我需要代理吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆