API 開發指南
遇到問題了嗎?不用擔心,答案都在這。
全站搜尋

Callback Function (JSONP)

Adding a callback function parameter will enclose the returned JSON object as a argument in a call to the callback function specified by you. This is especially useful when you're accessing our API using Javascript, you may need this to do cross domain ajax calls.

For example, adding callback=testFunc as below:


curl --get -d "callback=testFunc" \

-H "Authorization:Basic YOUR_API_KEY_GOES_HERE" \

-d api \

https://www.ragic.com/demo/sales/1

Will enclose the returned JSON object in a function call so you can process the returned data in your callback function:


testFunc({"17": {

"Account Name": "Dunder Mifflin",

"Account Owner": "Jim Halpert",

"Phone": "1-267-922-5599",

...

...

});

回最上面 目錄

馬上註冊
免費試用 Ragic!

用 Google 帳號註冊

立即科技 Ragic, Inc.
02-7728-8692
台北市中正區南昌路二段81號9樓