https://github.com/wokwi/platform-io-esp32-http-client
ESP32 HTTP Client with Wokwi CI example
https://github.com/wokwi/platform-io-esp32-http-client
Last synced: 3 months ago
JSON representation
ESP32 HTTP Client with Wokwi CI example
- Host: GitHub
- URL: https://github.com/wokwi/platform-io-esp32-http-client
- Owner: wokwi
- License: mit
- Created: 2023-11-12T10:49:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T17:33:11.000Z (over 1 year ago)
- Last Synced: 2024-11-16T01:11:52.176Z (about 1 year ago)
- Language: C++
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP32 HTTP Client
A simple HTTP Client example that connects to http://example.org and prints the response to the serial port.
Includes an [automated test scenario](./http-client.test.yaml) that runs the simulation and validates the serial output.
Use [Wokwi](https://marketplace.visualstudio.com/items?itemName=wokwi.wokwi-vscode) to simulate this project, and the [Wokwi CLI](https://github.com/wokwi/wokwi-cli) to run the automated test.
## Building
This is a [PlatformIO](https://platformio.org) project. To build it, [install PlatformIO](https://docs.platformio.org/en/latest/core/installation/index.html), and then run the following command:
```
pio run
```
## Simulate the project
To simulate this project, install [Wokwi for VS Code](https://marketplace.visualstudio.com/items?itemName=wokwi.wokwi-vscode). Open the project directory in Visual Studio Code, press **F1** and select "Wokwi: Start Simulator".
## Run in wokwi-cli
To run the automated test scenario, install the [Wokwi CLI](https://github.com/wokwi/wokwi-cli/#installation), and create a [Wokwi CLI token](https://wokwi.com/dashboard/ci). Then run the following commands:
Linux/Mac:
```bash
export WOKWI_CLI_TOKEN="your token goes here"
wokwi-cli --scenario http-client.test.yaml .
```
Windows:
```powershell
$env:WOKWI_CLI_TOKEN="your token goes here"
wokwi-cli --scenario http-client.test.yaml .
```