Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python HTTP 404-无法将url参数传递给flask路由_Python_Http_Flask - Fatal编程技术网

Python HTTP 404-无法将url参数传递给flask路由

Python HTTP 404-无法将url参数传递给flask路由,python,http,flask,Python,Http,Flask,在此方面的任何帮助都将不胜感激 我试图在URL查询字符串中向我的Flask应用程序传递几个参数 这是我的密码 @application.route('/registeruser/',方法=['GET'] def store_on_cloudant(): qr=request.args.get('qr\u码') fb\u access\u tok=request.args.get('fb\u令牌') db.save({ “qr”:qr, “fb_访问_-tok”:fb_访问_-tok }) 返回

在此方面的任何帮助都将不胜感激

我试图在URL查询字符串中向我的Flask应用程序传递几个参数

这是我的密码

@application.route('/registeruser/',方法=['GET']
def store_on_cloudant():
qr=request.args.get('qr\u码')
fb\u access\u tok=request.args.get('fb\u令牌')
db.save({
“qr”:qr,
“fb_访问_-tok”:fb_访问_-tok
})
返回
这是URL,我正在使用GET,因为我正在访问浏览器中的页面

localhost:5000/registeruser/qr_code=qr12345&fb_token=token12345

我得到一个HTTP404错误。我是否正确传递参数?

您缺少一个问号:

localhost:5000/registeruser/?qr_code=qr12345&fb_token=token12345

如果没有问号,参数是URL路径的一部分,而不是查询参数

这总是小事。非常感谢!我真的很感谢你的帮助。我会在15分钟内接受你的回答。