jQuery AJAX Cross Domain with BASIC Authentication

前端 未结 3 1260
轻奢々
轻奢々 2021-01-14 18:22

I\'m attempting to make use of the Beanstalk (beanstalkapp.com) API by pulling data into a webpage so people can view it without accessing my SVN.

What I\'m doing to

3条回答
  •  自闭症患者
    2021-01-14 19:03

    You will need to make proxy for cross-domain ajax requests.

    Usual scenario looks like this:

    1. Client send ajax request to server
    2. Your server forwards request to external/remote server
    3. Waiting on response from remote server
    4. Parse and process response from remote server
    5. Send response back to client

    If you are using php you can send requests with curl, and it is pretty easy to implement. I have wrote article on this topic recently http://www.svlada.com/proxy-ajax-requests-curl-and-symfony-2/.

提交回复
热议问题