http
API |
description |
__http |
Help you to send the http request. |
Native binding API
__http
__http({
method: 'GET'
url:
header:
}, function(data) {
});
__http({
url:
method: 'POST'
header:
contentType:
data:
}, function(data) {
});
var config = {
method: 'GET',
url: 'http://apis.map.qq.com/ws/location/v1/ip?ip=61.135.17.68&key=6MABZ-VFKAF-DITJ6-JRPZN-OUOFJ-ULBWQ',
header: '\r\n',
};
__http(config, function(data) {
print(data);
var i = JSON.parse(data);
print('status:' + i.status);
});
var data = { a: 123 };
var config = {
url: "http://",
method: "POST",
header: "deviceKey:123123\r\n";,
contentType: "application/json",
data: JSON.stringify(data),
}
__http(config, function(data) {
print('data: '+ data);
});