Page 1 of 1

Re: Correct CURL syntax

Posted: 15. Aug 2018, 15:03
by admin
Hi,

here you will find some examples incl. CURL from PHP or Command Line.

https://www.pushsafer.com/en/pushapi

What programming language you use?

Kevin

Re: Correct CURL syntax

Posted: 16. Aug 2018, 08:56
by admin
Hi,

set the url in quotes, then it works

Code: Select all

curl --header "Content-Type: text/plain" --request PUT --data "OFF" "https://www.pushsafer.com/api?k=XXXXXXXXXXXXXXXXXXXX&d=XXX&i=10&c=%23ffd699&v=3&pr=2&a=1&t=test&m=test"
Kevin

Re: Correct CURL syntax

Posted: 16. Aug 2018, 11:05
by admin
great that it works now.

You have to encode these characters
For static sending, you can use our url encoder:
https://www.pushsafer.com/en/url-encoder-decoder

Otherwise you can use this:

Code: Select all

chcp 1252>nul
curl --header "Content-Type: text/plain" --request PUT --data "OFF" "https://www.pushsafer.com/api?k=XXXXXXXXXXXXXXXXXXX&d=XXX&i=10&c=%23ffd699&v=3&pr=2&a=1&t=test&m=АБВГДЕЖ"
chcp %cp%>nul
exit

Re: Correct CURL syntax

Posted: 22. Aug 2018, 07:37
by admin
can you send me your bat file by mail! I will check

Kevin