mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-04-19 21:22:15 +03:00
St update
This commit is contained in:
parent
050821b224
commit
889d7b35d9
@ -2,11 +2,7 @@
|
|||||||
GET client with HTTP basic authentication for ArduinoHttpClient library
|
GET client with HTTP basic authentication for ArduinoHttpClient library
|
||||||
Connects to server once every five seconds, sends a GET request
|
Connects to server once every five seconds, sends a GET request
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -17,7 +13,11 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
#include "arduino_secrets.h"
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/BasicAuthGet/arduino_secrets.h
Normal file
3
examples/BasicAuthGet/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
@ -16,7 +16,12 @@
|
|||||||
|
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/CustomHeader/arduino_secrets.h
Normal file
3
examples/CustomHeader/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
@ -9,11 +9,7 @@
|
|||||||
|
|
||||||
For more on dweet.io, see https://dweet.io/play/
|
For more on dweet.io, see https://dweet.io/play/
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 15 Feb 2016
|
created 15 Feb 2016
|
||||||
updated 16 Feb 2016
|
updated 16 Feb 2016
|
||||||
@ -23,7 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
const char serverAddress[] = "dweet.io"; // server address
|
const char serverAddress[] = "dweet.io"; // server address
|
||||||
int port = 80;
|
int port = 80;
|
||||||
|
3
examples/DweetGet/arduino_secrets.h
Normal file
3
examples/DweetGet/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -18,7 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
const char serverAddress[] = "dweet.io"; // server address
|
const char serverAddress[] = "dweet.io"; // server address
|
||||||
int port = 80;
|
int port = 80;
|
||||||
|
3
examples/DweetPost/arduino_secrets.h
Normal file
3
examples/DweetPost/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -13,11 +13,7 @@
|
|||||||
This example shows how to concatenate Strings to assemble the
|
This example shows how to concatenate Strings to assemble the
|
||||||
PUT request and the body of the request.
|
PUT request and the body of the request.
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
modified 15 Feb 2016
|
modified 15 Feb 2016
|
||||||
by Tom Igoe (tigoe) to match new API
|
by Tom Igoe (tigoe) to match new API
|
||||||
@ -26,9 +22,15 @@
|
|||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include "config.h"
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||||
|
|
||||||
char hueHubIP[] = "192.168.0.3"; // IP address of the HUE bridge
|
char hueHubIP[] = "192.168.0.3"; // IP address of the HUE bridge
|
||||||
String hueUserName = "huebridgeusername"; // hue bridge username
|
String hueUserName = "huebridgeusername"; // hue bridge username
|
||||||
|
|
||||||
|
3
examples/HueBlink/arduino_secrets.h
Normal file
3
examples/HueBlink/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -3,11 +3,7 @@
|
|||||||
Connects to server once every five seconds, sends a POST request
|
Connects to server once every five seconds, sends a POST request
|
||||||
with custome headers and a request body
|
with custome headers and a request body
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -18,7 +14,14 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/PostWithHeaders/arduino_secrets.h
Normal file
3
examples/PostWithHeaders/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -3,11 +3,7 @@
|
|||||||
Connects to server once every five seconds, sends a DELETE request
|
Connects to server once every five seconds, sends a DELETE request
|
||||||
and a request body
|
and a request body
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -16,7 +12,14 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/SimpleDelete/arduino_secrets.h
Normal file
3
examples/SimpleDelete/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -2,11 +2,7 @@
|
|||||||
Simple GET client for ArduinoHttpClient library
|
Simple GET client for ArduinoHttpClient library
|
||||||
Connects to server once every five seconds, sends a GET request
|
Connects to server once every five seconds, sends a GET request
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -15,7 +11,14 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
|
||||||
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/SimpleGet/arduino_secrets.h
Normal file
3
examples/SimpleGet/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -11,8 +11,14 @@
|
|||||||
|
|
||||||
// This example downloads the URL "http://arduino.cc/"
|
// This example downloads the URL "http://arduino.cc/"
|
||||||
|
|
||||||
char ssid[] = "yourNetwork"; // your network SSID (name)
|
#include "arduino_secrets.h"
|
||||||
char pass[] = "secretPassword"; // your network password
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Name of the server we want to connect to
|
// Name of the server we want to connect to
|
||||||
const char kHostname[] = "arduino.cc";
|
const char kHostname[] = "arduino.cc";
|
||||||
|
3
examples/SimpleHttpExample/arduino_secrets.h
Normal file
3
examples/SimpleHttpExample/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -3,11 +3,7 @@
|
|||||||
Connects to server once every five seconds, sends a POST request
|
Connects to server once every five seconds, sends a POST request
|
||||||
and a request body
|
and a request body
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -16,7 +12,13 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/SimplePost/arduino_secrets.h
Normal file
3
examples/SimplePost/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -3,11 +3,7 @@
|
|||||||
Connects to server once every five seconds, sends a PUT request
|
Connects to server once every five seconds, sends a PUT request
|
||||||
and a request body
|
and a request body
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 14 Feb 2016
|
created 14 Feb 2016
|
||||||
by Tom Igoe
|
by Tom Igoe
|
||||||
@ -16,7 +12,13 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
|
|
||||||
char serverAddress[] = "192.168.0.3"; // server address
|
char serverAddress[] = "192.168.0.3"; // server address
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
3
examples/SimplePut/arduino_secrets.h
Normal file
3
examples/SimplePut/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
@ -3,11 +3,6 @@
|
|||||||
Connects to the WebSocket server, and sends a hello
|
Connects to the WebSocket server, and sends a hello
|
||||||
message every 5 seconds
|
message every 5 seconds
|
||||||
|
|
||||||
note: WiFi SSID and password are stored in config.h file.
|
|
||||||
If it is not present, add a new tab, call it "config.h"
|
|
||||||
and add the following variables:
|
|
||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
||||||
created 28 Jun 2016
|
created 28 Jun 2016
|
||||||
by Sandeep Mistry
|
by Sandeep Mistry
|
||||||
@ -16,7 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
#include <ArduinoHttpClient.h>
|
#include <ArduinoHttpClient.h>
|
||||||
#include <WiFi101.h>
|
#include <WiFi101.h>
|
||||||
#include "config.h"
|
#include "arduino_secrets.h"
|
||||||
|
|
||||||
|
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
|
||||||
|
/////// Wifi Settings ///////
|
||||||
|
char ssid[] = SECRET_SSID;
|
||||||
|
char pass[] = SECRET_PASS;
|
||||||
|
|
||||||
char serverAddress[] = "echo.websocket.org"; // server address
|
char serverAddress[] = "echo.websocket.org"; // server address
|
||||||
int port = 80;
|
int port = 80;
|
||||||
|
3
examples/SimpleWebSocket/arduino_secrets.h
Normal file
3
examples/SimpleWebSocket/arduino_secrets.h
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#define SECRET_SSID ""
|
||||||
|
#define SECRET_PASS ""
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
char ssid[] = "ssid"; // your network SSID (name)
|
|
||||||
char pass[] = "password"; // your network password
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user