'flask-restful unable to add headers into response
I have a flask-restful Resource like so
class UserLogin(Resource):
@classmethod
def post(cls):
return {"msg": "test"}, 200, {"Foo": "bar"}
It should be the case that in the headers of my response, 'Foo' is set to 'bar', but I am unable to see it.
I do see the json body {'msg':'test'} in response, however.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|