I have published an official library that supports Arduino-compatible Wi-Fi-enabled boards, along with several examples. The library supports the Arduino MKR1000, Arduino MKR WiFi 1010, Arduino Uno WiFi Rev2, Arduino Mega WiFi Rev2, Arduino Uno R4 WiFi, ESP8266, and ESP32.
