Page 3 of 3
Re: arduino pushsafer can't compile
Posted: 11. Jan 2017, 08:59
by admin
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
Now you can check a older code from you with POST variables and replace
https with
http
Kevin
Re: arduino pushsafer can't compile
Posted: 11. Jan 2017, 13:38
by robomaniac
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
Re: arduino pushsafer can't compile
Posted: 12. Jan 2017, 08:29
by admin
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");
Re: arduino pushsafer can't compile
Posted: 12. Jan 2017, 19:15
by robomaniac
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.