这是我接受 HTTP GET 请求的功能:
class Test2(Resource):
@jwt_required
def get(self):
mailid = request.args.get('mailid', '')
username = request.args.get('username', '')
password = request.args.get('password', '')
print("Mail ID, Username, Password = ")
print(mailid, username, password)
return 'Not supported'
当我尝试以下 URL 时,我收到错误“缺少授权标头”:
http://127.0.0.1:5000/test2?mailid=ABC.xyz.com&username=ABC&password=password&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTIzODc0MzAyLCJpYXQiOjE1MjM4NzM0MDIsImZyZXNoIjpmYWxzZSwibmJmIjoxNTIzODczNDAyLCJqdGkiOiI2NzYxNzdmNS05NGE3LTQzYTUtYjVhYy1mMmVlMzhhN2JhOWEiLCJpZGVudGl0eSI6MTIzfQ.iXZ9_qDtTw5_Q2VxEpvv5pYVAaI8M7P_CVy2Ln79eok