Correct CURL syntax

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows Store
Homepage
User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Correct CURL syntax

Postby admin » 15. Aug 2018, 15:03

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
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Correct CURL syntax

Postby admin » 16. Aug 2018, 08:56

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
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Correct CURL syntax

Postby admin » 16. Aug 2018, 11:05

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
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Correct CURL syntax

Postby admin » 22. Aug 2018, 07:37

can you send me your bat file by mail! I will check

Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10


Who is online

Users browsing this forum: Bing [Bot] and 34 guests