0
푸시 알림을 보낼 cURL 명령을 실행하려고합니다. 내가 할 cURL 명령을 가지고 있지만 지금은 노드에서 실행해야합니다.요청을 사용하여 nodejs에서 Urban Airship cURL 명령을 실행 하시겠습니까?
curl -v -X POST -u "<shared>:<secret>" -H "Content-type: application/json" -H "Accept: application/vnd.urbanairship+json; version=3;" --data '{"audience" : {"tag":[testTag]}, "device_types" : "all", "notification" : {"alert": "Test push notification"} }' https://go.urbanairship.com/api/push/"
그리고 노드 내 현재 요청은 다음과 같습니다 :
현재 컬은
request({
url: "https://go.urbanairship.com/api/push/",
method: "POST",
json: {
audience : {
tag : [ "testTag" ]
},
device_types : "all",
notification : {
alert : "Test push notification"
}
}
});
내가 공유 비밀, 또는이 가장 인 경우에도 전달하는 방법을 잘 모르겠어요 연습.