# MicroPython HTTPS example for Wokwi.com
import network
import urequests
import time
# Connect to WiFi
print("Connecting to WiFi", end="")
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect('Wokwi-GUEST', '')
while not sta_if.isconnected():
print(".", end="")
time.sleep(0.25)
print("Connected!")
# Send HTTPS request
print("Sending HTTPS request... ", end="")
response = urequests.get("https://api.dictionaryapi.dev/api/v2/entries/en/success")
print(response.text)