Contributed by WangChong, curated by Ai-Thinker
Hello everyone, I'm a netizen from the north of mainland China. I believe you all have the M61-32S in hand. Some of you may be troubled by how to connect to WiFi and send HTTP requests. Through my research and the pitfalls other big shots on the forum have stepped into, I put together a minimal code for connecting to WiFi and sending HTTP requests to share with everyone.
Notes
Operation Steps
HTTP only
If the requested data is too large, the code will run away and needs a restart. The HTTPCLIENT code is not written by me; it comes with the SDK, and I don’t have a good solution yet.
Usage steps:
Operation Steps (continued)
Extract my code
Modify the files in the .vscode directory, as shown below.

Modify the Makefile as shown below.

In Main.c, modify your WiFi connection and the URL you want to request.

All the code has comments; I hope it’s useful to everyone.
Attachments:

WiFiConnectionWithHttpRequest.zip (13.05 KB, downloads: 79)
Have questions?
For other questions, please visit the unified discussion area: Ai-Thinker Discussions

