UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import urequests
setScreenColor(0x222222)
try:
req = urequests.request(method='GET', url='https://httpbin.org/get', headers={'Accept':'application/json'})
print((str('Status: ') + str((req.status_code))))
print(req.text)
gc.collect()
req.close()
except:
print((str('Status: ') + str((req.status_code))))
print('Fail')
from m5stack import *
from m5ui import *
from uiflow import *
import urequests
from libs.json_py import *
setScreenColor(0x222222)
try:
req = urequests.request(method='POST', url='https://httpbin.org/post',json={'Payload':(py_2_json({'msg':'hello'}))}, headers={'Content-Type':'application/json'})
print((str('Status: ') + str((req.status_code))))
print(req.text)
gc.collect()
req.close()
except:
print((str('Status: ') + str((req.status_code))))
print('Fail')
try:
req = urequests.request(method='GET', url='https://httpbin.org/get', headers={'Accept':'application/json'})
print((str('Status: ') + str((req.status_code))))
print(req.text)
gc.collect()
req.close()
except:
print((str('Status: ') + str((req.status_code))))
print('Fail')
print(req.status_code)
print(req.text)