Accessing data from a web server

In the previous section, we learned how to connect an existing Wi-Fi hotspot with an ESP32 board. Now, we will try to access a web server from our ESP32 board. Technically, ESP32 APIs adopt the socket programming model to communicate with other systems over a network.

For demo purposes, we will access a web server. We will use Google as a web server target here. We can start by creating the ESP32 project called http_request, with the http_request.c file as the main program. This project can also be found on the official website of the Espressif IDF project, at https://github.com/espressif/esp-idf/tree/master/examples/protocols/http_server.

  1. First, we will load the libraries in our project, including the network ...

Get Internet of Things Projects with ESP32 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.