l'https sa marche pour get
This commit is contained in:
parent
454172a5fd
commit
e1eebed863
@ -19,7 +19,9 @@ char ssid[] = "Clement4G"; // your network SSID (name)
|
||||
char pass[] = "Clement123"; // your network password
|
||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||
|
||||
char server[] = "arduino.tips";
|
||||
//char server[] = "arduino.tips";
|
||||
|
||||
char server[] = "iot2.epi.cb85.software";
|
||||
|
||||
void printWifiStatus();
|
||||
|
||||
@ -57,11 +59,11 @@ void setup() {
|
||||
Serial.println();
|
||||
Serial.println("Starting connection to server...");
|
||||
// if you get a connection, report back via serial
|
||||
if (client.connect(server, 80)) {
|
||||
if (client.connectSSL(server, 443)) {
|
||||
Serial.println("Connected to server");
|
||||
// Make a HTTP request
|
||||
client.println("GET /asciilogo.txt HTTP/1.1");
|
||||
client.println("Host: arduino.tips");
|
||||
client.println("GET /api/collections/poubelle_status/records HTTP/1.1");
|
||||
client.println("Host: iot2.epi.cb85.software");
|
||||
client.println("Connection: close");
|
||||
client.println();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user