Skip to content

Simplify HTTP requests using ESP8266-01 with Arduino. Easily connect to Wi-Fi, send HTTP GET and POST requests, and handle responses. Ideal for IoT projects and data retrieval from web APIs.

Notifications You must be signed in to change notification settings

eshansurendra/GenericHTTP-ESP8266-01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GenericHTTP Arduino Library

The GenericHTTP library simplifies sending HTTP requests using the ESP8266-01 module (e.g., ESP-01) with an Arduino board. It provides a convenient way to establish Wi-Fi connection, send various types of HTTP requests, and handle responses.

Features

  • Connect to Wi-Fi network using provided SSID and password.
  • Send HTTP GET and POST requests to specified endpoints.
  • Handle HTTP responses, including parsing and extracting data.

Installation

  1. Download the latest release of the library.
  2. In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library... and select the downloaded ZIP file.
  3. Restart the Arduino IDE.

Usage

  1. Import the GenericHTTP.h library at the beginning of your Arduino sketch:
#include <GenericHTTP.h>
  1. Create an instance of the GenericHTTP class:
GenericHTTP http;
  1. Connect to Wi-Fi using connectToWiFi function:
http.connectToWiFi("your_wifi_ssid", "your_wifi_password");
  1. Send an HTTP GET request:
bool success = http.sendHTTPRequest("GET", "example.com", "80", "/path/to/endpoint", nullptr, nullptr);
if (success) {
  // Handle successful response
} else {
  // Handle failed request
}

Examples

The library comes with several example sketches to help you get started:

  • Basic Usage: Demonstrates the basic usage of the library to connect to Wi-Fi and send an HTTP GET request.
  • Advanced Usage: Shows more advanced scenarios, such as handling responses and using custom headers.

Feel free to explore these examples to understand how to integrate the GenericHTTP library into your own projects.

About

Simplify HTTP requests using ESP8266-01 with Arduino. Easily connect to Wi-Fi, send HTTP GET and POST requests, and handle responses. Ideal for IoT projects and data retrieval from web APIs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages