Passing custom HTTP headers using Flask’s test_client

Passing custom HTTP headers using Flask’s test_client

Passing custon HTTP headers using Flask’s test_client object should have been as easy as doing this:

For some reason this didn’t work in my Flask project. In case others have the same issue as I did, maybe the solution I found to work may work for others too:

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: