我正在使用 IBM workligth IDE。因为我是新手。我正在寻找一种在该 IDE 中使用 WEB Api 的方法。但我没有成功。我什至找到了这个链接,但不是我所期望的 http://www.ibm.com/developerworks/mobile/worklight/getting-started.html。有没有办法在 ibm worklight 中使用 json 格式的 web api。任何建议或想法都会很棒。
这是我的网络 api 详细信息
Request URI:
http://api.worldweatheronline.com/free/v1/search.ashx?q=Chennai&format=json&key=53jjtnrm9d5jucpmxyyhj7vn
请求标头:
{
"X-Originating-Ip": "14.140.167.22"
}
Response Headers
{
"Age": "0",
"Cache-Control": "public, no-cache=\"Set-Cookie\", max-age=120",
"Content-Type": "application/json; charset=utf-8",
"Date": "Tue, 17 Sep 2013 08:02:27 GMT",
"Server": "Microsoft-IIS/7.5",
"X-Aspnet-Version": "4.0.30319",
"X-Cache": "MISS",
"X-Mashery-Responder": "prod-j-worker-eu-west-1a-90.mashery.com",
"X-Powered-By": "UKFast Webcelerator",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive"
}
Response Body:
{
"search_api": {
"result": [{
"areaName": [{
"value": "Chennai"
}],
"country": [{
"value": "India"
}],
"latitude": "13.083",
"longitude": "80.283",
"population": "0",
"region": [{
"value": "Tamil Nadu"
}],
"weatherUrl": [{
"value": "http:\/\/www.worldweatheronline.com\/Chennai-weather\/Tamil-Nadu\/IN.aspx"
}]
}]
}
}