Hello!
I'm trying to "port" a simple script to send a notification using pushbullet from my esp8266.
Here is the original python code:
[code]
import requests
import json
body = "Corpo"
title = "Titolo"
data_send = {"type": "note", "title": title, "body": body}
API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxx"
resp = requests.post('https://api.pushbullet.com/v2/pushes', data=json.dumps(data_send), headers={'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json'})
[/code]
if i replace requests with urequests and i try this code on esp8266 i get this error:
[code]
ssl_handshake_status: -256
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "urequests.py", line 104, in post
File "urequests.py", line 56, in request
OSError: [Errno 5] EIO
[/code]
I'm kinda new to micropython, i hope someone could help me understand more (or just send me in the right direction)