Hello Friends,
I want to program rest api for this case:
curl -d '{"aps":{"alert":"hi","sound":"default"}}' \
--cert <your-certificate.pem>:<certificate-password> \
-H "apns-topic: <your-app-bundle-id>" \
--http2 \
https://api.development.push.apple.com/ ... vice-token>
that is use --http2 parameter. how can I define in "set the httpHeaders to" structure.
I am grateful for your help.
Regards,
Anil
rest api used --http2
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: rest api used --http2
To force LiveCode to use http2, you'd have to change libUrl or tsNet.tsNet might have a parameter that lets you choose http2, since it includes the CURL library. Unfortunately, tsNet isn't open source. You could also write your own request along the lines if
write "GET /index.html HTTP/2.0" & cr to socket "https://api.development.push.apple.com:80"
I haven't tested this. You may need to use the IP address and you'd have to figure out how to open a datagram socket to Apple's server.
Why don't you use the built-in push notification messages?
write "GET /index.html HTTP/2.0" & cr to socket "https://api.development.push.apple.com:80"
I haven't tested this. You may need to use the IP address and you'd have to figure out how to open a datagram socket to Apple's server.
Why don't you use the built-in push notification messages?
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode