from kivy.uix.boxlayout import BoxLayout
import requests, json, urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class SignupPage(BoxLayout):
def signup(self):
username, password = self.ids.username.text, self.ids.password.text
info = {
"signup": [
{
"username": username,
"password": password
}
]
}
# headers = {"Content-type": "application/json"}
resp =
requests.post(url, data=dict(info=json.dumps(info)), verify=False)
if resp:
if username and password:
print('Data successfully saved!')
else:
print('Please enter user name and password!')