I'm using microPython on a Arduino Nano Connect RP2040 and I'm trying to request an https website using the "urequests" library. Every time I try, I get the error message: "ImportError: no module named 'ussl'". I thought microPython would contain the ussl module. However, somehow that doesn't seem to be the case. I've tried several micropython versions and searched everywhere but could not find a way to fix this.
MY CODE:
import urequests as requests
url = "https://api.spotify.com/v1/me/player/next?device_id=****"
token = '****'
headers = {
"Authorization": "Bearer" + token,
"Accept": "application/json",
"Content-Type": "application/json"
}
result = requests.post(url, headers=headers)
print(result.status_code)
MY SETUP:
MicroPython: v1.18-omv-r13
IDE: OpenMV (v4.3.3)
HAL: v1.3.0
BOARD: Arduino Nano RP2040 Connect-RP2040