我有这样 curl -u 209f734234234j556l45l6j64218ecffb0a900aff998c8e0: -H "Content-Type: application/json" -H "X-Ionic-Application-Id: 123k4j54k" https://push.ionic.io/api/v1/push -d '{"tokens": ["token1,token2,token3"],"notification":{"alert":"NarayaN","android":{"payload":{"$state":"app.home"}}}}'
需要帮助从卷曲转换请求
卷曲,我有它转换为我有-u PARAM麻烦这种状态
var request = require('request');
var headers = {
'Content-Type': 'application/json',
'X-Ionic-Application-Id': 'e4ea3c2d'
};
var options = {
url: 'https://push.ionic.io/api/v1/push',
headers: headers
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
request(options, callback);
。如何使用,在HTTP REQ
通过查看REQ我可以看到method is post
任何帮助深表感谢。