import requests,json data = json.dumps( {"username":"ljx", "password":"123456"}) res = requests.post( "http://127.0.0.1:8000/SDataApi/examLogin", data =data) print( res.text)