Open ifightcode opened 6 years ago
Try This
def basic(request):
test=request.query['name']
Try this
def basic(request): test = request.form['name']
def auth(request):
post = app.getPost(request)
print(post)
def getPost(req):
list = req.body.decode('utf-8').split('&')
post = {}
for item in list:
p = item.split('=')
post[p[0]]=p[1]
return post
result is : {'username': 'vadim', 'password': '123'}
I did it this way
I was trying to extract POST parameters from requests and failed. What I've tried
And I'm getting error
Any idea how to get things functional?