开发者

web service for "fake" cross domain requests? [closed]

开发者 https://www.devze.com 2023-01-14 04:41 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software 开发者_JAVA百科libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 12 months ago.

Improve this question

does there exist a service that will let me fetch the contents of another page and return it in some ways i can console via javascript?

i need to make a cross domain request, and i am trying to find a way to do so without writing my own web service


You have CORS in newer browsers if the server is set up to do it. You have JSONP if the server you are making the request too supports it.

You can use Yahoo Pipes and let it generate the JSON for you to make the request with JSONP.

You can just turn off your browser's security and let the Ajax calls flow in. >:)

Or you can bite the bullet and write a few lines of serverside code for your proxy which probably would have taken the same amount of time to write as it took me to write this response.


I would agree with epascarello. Just whip up some a cURL class specific to the site you want to hit. I'd guess 20 lines, tops, including sanitizing a few parameters.

0

精彩评论

暂无评论...
验证码 换一张
取 消