<%
ApplicationAPIKey = "AIzaSyBi0pn1ckaJhRL9kK3mbwsHzk7x0fdE_Z8"
RegId = "APA91bFNkzpbgBJnWkDgyGmU0XsF8ZLMAEhVaAtcbf9po8_i1GoA4JNt4HiUc6xScBMEOoJMIHHybZECIns9e2EF4AGalfOgZqwmQIEUG1UpVk08nTapx0iY17vOELD_9wIQTUdRwUsR"
tickerText = "알림테스트"
contentTitle = "테스트 제목"
message = "헬로~~~ 테스트입니다.~~~"
postJSONData = "" & _
"{" & _
" ""registration_ids"" : [ """ & RegId & """ ]" & _
", ""data"": {" & _
" ""tickerText"" : """ & tickerText & """" & _
" , ""contentTitle"" : """ & contentTitle & """" & _
" , ""message"" : """ & message & """" & _
" }" & _
"}"
Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
httpObj.open "POST" , PushServerURL, False
httpObj.SetRequestHeader "Content-Type", "application/json"
httpObj.SetRequestHeader "Authorization", "key=" & ApplicationAPIKey
httpObj.Send postJSONData
httpObj.WaitForResponse
If httpObj.Status = "200" Then
response.Write("전송성공 : " & httpObj.ResponseText)
Else
response.Write("전송실패 : " & httpObj.ResponseText)
End If
%>
댓글
댓글 쓰기