rest api used --http2

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Posts: 12
Joined: Fri Oct 24, 2014 10:14 am

rest api used --http2

Post by HAnil » Fri Aug 11, 2017 9:16 am

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 \ ... vice-token>

that is use --http2 parameter. how can I define in "set the httpHeaders to" structure.

I am grateful for your help.

Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm

Re: rest api used --http2

Post by Mark » Mon Sep 04, 2017 1:38 am

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 ""

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:
The book "Programming LiveCode for the Real Beginner"! Get it here!

Post Reply

Return to “Internet”