Closed quazgar closed 8 months ago
It would be great if webtest.app.TestApp could have default headers set for all requests. Similar to the cookie jar.
Describe alternatives you've considered I am currently just adding headers for every request I make.
Additional context May also be useful for cases where headers are used for CSRF tokens or the like.
Try TestApp(extra_environ={HTTP_YOUR_HEADER="value"})
TestApp(extra_environ={HTTP_YOUR_HEADER="value"})
Feature Request
It would be great if webtest.app.TestApp could have default headers set for all requests. Similar to the cookie jar.
Describe alternatives you've considered I am currently just adding headers for every request I make.
Additional context May also be useful for cases where headers are used for CSRF tokens or the like.