[心得] jsonp proxy
我們知道 jsonp 是需要 server side 支援才有可能辦到
比方說這個網站不支援 jsonp
API介紹 : http://useragentstring.com/pages/api.php
用法 : http://www.useragentstring.com/?getJSON=all
所以我們需要另一台 server 去讀取上面的 json 然後支援 jsonp
正好已經有網站幫我們作這件事了
API介紹 : http://blog.jsonpify.com/post/435053442/jsonpify-proxy-service
用法 : http://ppt.cc/s4fy
所以我們可以實驗一下效果
到這裡 : http://ppt.cc/dDH(
import 這個 jsonp : http://ppt.cc/nC_(
就會看到正確的完成任務
--
blog:http://etrex.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.167.9.172
→
01/15 13:35, , 1F
01/15 13:35, 1F
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章
33
68