I'm creating a group of queries that will all share the exact same set of headers.
Is it possible to create the group of headers once and then copy/paste them to other queries? Or, even better, can I assign a known group of headers to multiple queries?
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.