Enthernet Code
Enthernet Code
DIIDevHeads IoT Integration Server
Created by Enthernet Code on 6/19/2024 in #edge-networking
how do I use the requests library to send data to an HTTP endpoint in MicroPython on an ESP8266?
Hello guys, how do I use the requests library to send data to an HTTP endpoint in MicroPython on an ESP8266? My code fails to connect. Here's the code:
import requests

response = request.post('http://example.com/data', json={'sensor': 'value'})
print(response.text)
import requests

response = request.post('http://example.com/data', json={'sensor': 'value'})
print(response.text)
@Middleware & OS
5 replies