Replies: 1 comment
-
Your example has put the login details in the query parameters, essentially defeating the point of using a POST method. Try sending the details in the body. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I am newbie! Please tell me how to process a post request
(For example I send "http://127.0.0.1:8080/login/?login=123&pass=999")
`from aiohttp import web
routes = web.RouteTableDef()
@routes.post('/post')
async def do_login(request):
data = await request.post()
login = data['login']
password = data['pass']
print(login) # 123 ?
print(password ) # 999 ?
app = web.Application()
app.add_routes(routes)
web.run_app(app)`
Please help me figure it out
Beta Was this translation helpful? Give feedback.
All reactions