[ESP8266]: ESP crashes and reboot after urequests.post

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
Hasenradball
Posts: 14
Joined: Tue May 21, 2019 12:52 pm
Location: Germany
Contact:

[ESP8266]: ESP crashes and reboot after urequests.post

Post by Hasenradball » Tue May 21, 2019 1:10 pm

Hi,

I did an http request with post and after the first post the ESP crashes and reboot.
Is there an Issue known for that?

The function loos like that:

def http_post_thingspeak2(self, url, time, payload):
# create dict object
body = {"write_api_key":"xxxxxxxxxxxxxxxx", "updates":[{"created_at": time, "field1":payload[0], "field2":payload[1], "field3":payload[2]}]}
print(body)
try:
resp = urequests.post(url, json=body)
print(resp.text, end='\n\n')
return True
except:
print('ERROR: HTTP POST Request failed!')
return False

Post Reply