Is it possible to re-use headers in Paw?
The best way to do so is to have an environment domain for that. Make one variable per header, you may have a variable called Content-Type
(as an example) and give it the application/json
value for one environment, or application/xml
for another environment. This way you'll be able to switch between JSON and XML in many requests at once.
In the example above, there are 2 variables set, one for the Content-Type
and another one for Accept
. Both variable are then used in the request. As you can see in the preview at the bottom, the variables are replaced by their values in the HTTP request.