arduino pushsafer can't compile

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: arduino pushsafer can't compile

Postby admin » 11. Jan 2017, 08:59

Hi Jerome,

when you got this message, it seems to work.

Arduino dont support https, so i changed the api. Now you can access the api via http

Code: Select all

http://www.pushsafer.com/api
Now you can check a older code from you with POST variables and replace https with http

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

robomaniac

Re: arduino pushsafer can't compile

Postby robomaniac » 11. Jan 2017, 13:38

when you got this message, it seems to work.
well, I type the line of code directly in chrome to test out the syntax, it was not send from arduino

I just tested this morning on new hardware not related to wifi. It's a bluetooth hardware that use my phone to access the internet.
Other code that use client.connect and GET does work great.

this code, does not work. I will try original code you posted.

Code: Select all


int length = 666;

if(client.connect("pushsafer.com",80))
  {
    client.println("POST /api HTTP/1.1");
    client.println("Host: https://www.pushsafer.com");
    client.println("Connection: close\r\nContent-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.print(length);
    client.println("\r\n");;
    client.print("k=my_key");
    client.print("&m=message");
    client.print("&t=title");
    client.print("&s=2");
    client.print("&v=3");
    client.print("&i=3");
    client.print("&d=a");
    client.print("&retry=60");
    client.print("&expire=3600");

    
  } else {
    Serial.println("connection failed");
  }
I get this

Code: Select all

HTTP/1.1 400 Bad Request
Date: Wed, 11 Jan 2017 13:32:52 GMT
Server: Apache
Content-Length: 30

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

Re: arduino pushsafer can't compile

Postby admin » 12. Jan 2017, 08:29

Arduino can not send request over https
change this

Code: Select all

client.println("Host: https://www.pushsafer.com");
to

Code: Select all

client.println("Host: http://www.pushsafer.com");
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

robomaniac

Re: arduino pushsafer can't compile

Postby robomaniac » 12. Jan 2017, 19:15

admin wrote:Arduino can not send request over https
change this

Code: Select all

client.println("Host: https://www.pushsafer.com");
to

Code: Select all

client.println("Host: http://www.pushsafer.com");
I am not using an arduino. It's a Cortex M0 processor that use the arduino IDE.
To be clear, all previous message, I was testing on ESP8266 WiFi Module. After your last message, I tested an other hardware module call "simblee", it's a ARM Cortex M0 processor and it connects to my cellphone via bluetooth to then connect to the internet.

second, I did try both http and https and nothings works.

now, since nothings works, I will focus on the HTTPS libraries.

also, I wanted to make sure my syntax it right regarding the way I send the info.


Who is online

Users browsing this forum: Google [Bot] and 30 guests