#在aiohttp中登录后如何获取参数

问题描述 投票:1回答:1

我的服务器正在从url等获取请求

http://127.0.0.1:8050/get_request#a=ABCD&b=EFG

但是request.rel_url仅返回/get_request

#之后我如何参加?

python-3.x python-3.7 aiohttp
1个回答
0
投票
嗯,看起来只有js可以阅读。我是第一次编写js,但这是我想出的:

(正在使用浏览器打开该页面)

<!doctype html> <html lang="ru"> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" href="style.css" /> </head> <body> <script type="text/javascript"> if (document.URL.indexOf("#") != -1) { var this_url = document.URL.replace("#", "?"); const request = new XMLHttpRequest(); request.open('GET', this_url); request.setRequestHeader('Content-Type', 'application/x-www-form-url'); request.send(); } </script> </body> </html>

© www.soinside.com 2019 - 2024. All rights reserved.