开发者

How do I begin with making a small cross-site AJAX script using someone's API?

Let's say I want to use this API: http://hiveminder.com/help/reference/API.html

The instructions walk through its use via. the开发者_运维问答 curl command line tool, which I'm unfamiliar with. I want to access this API through a simple script on my own page. What are the steps I need to do this?

Keep in mind it's been years since I've done any of this.


Because cross-site requests can't be done from the client, they need to be initiated from the server. I'm personally not familiar with Hiveminder, but the way in which you achieve requests from one domain to another is generally:

  • On the client-side, grab any necessary information from the user and send it to your server
  • From the server-side, initiate a request to the next domain (in your case, Hiveminder)
  • When the result is returned from said domain, send that information back up to the client.

I don't know what language your using, but since you mentioned cURL you may be interested in checking out what PHP offers in its cURL manual.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜