Hi,
When trying to use network.request I get “Invalid Parameter: URL argument was malformed URL”. How can I improve that url? https://cp.pushwoosh.com/json/1.3/%method%
Note that the editor here under escapes the % in this url.
I am trying to send a push message to a single device via the Pushwoosh service. I hope this is sort of how it should work, but I can’t test it due to the error :
[lua]
local pushMessage = { request = {
application =“xxx”,
auth = “xxxxxxxxxx”,
notifications =
{{
– Content settings
send_date = “now”,
ignore_user_timezone = true,
content = userSettings.nickName…" "…_G.invitationMessageText,
platforms = {1},
ios_badges = 1,
devices = {message.hwidFriend},
}}
}
}
local headers = {}
headers[“Content-Type”] = “application/x-www-form-urlencoded”
headers[“Accept-Language”] = “en-US”
local body = json.encode(pushMessage)
local params = {}
params.headers = headers
params.body = body
local url = “https://cp.pushwoosh.com/json/1.3/%method%”
network.request( url, “POST”, networkListener, params)
[/lua]
http://www.pushwoosh.com/programming-push-notification/pushwoosh-push-notification-remote-api/
thx