Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1.   BearSSL::WiFiClientSecure client;
  2.   client.setInsecure();
  3.   Serial.println("\nStarting connection to server...");
  4.   // if you get a connection, report back via serial:
  5.   if (!client.connect(SERVER, 443)) {
  6.     Serial.println("Connection failed!");
  7.     client.stop();
  8.     return false;
  9.   } else {
  10.     Serial.println("Connected ...");
  11.     Serial.print("GET ");
  12.     Serial.print(BASE_URI);
  13.     Serial.print(airportString);
  14.     Serial.println(" HTTP/1.1");
  15.     Serial.print("Host: ");
  16.     Serial.println(SERVER);
  17.     Serial.println("Connection: close");
  18. Serial.println();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement