-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Passing Default Headers #266
Comments
Hi @nsankaranarayanan. There's no way to do this at the moment, but it's a highly-requested feature. I've been trying to think of a clean way to do this for a while, and just had an idea. The headers tab could include include a Here's what an example environment might look like: {
"headers": {
"Accept": "application/json",
"Authorization": "token 1234"
}
} I think I'll play around with this today and see if I can get something working. |
I am open to the idea though I want to emphasize one thing. You currently have a good way of implementing substitution parameters. While implementing this don't lose that. |
Waiting for release. |
Closing this one in favor of #447 |
If anyone is still wanting this, I created a simple plugin to do it. It uses a special environment variable to pull header configuration from: https://www.npmjs.com/package/insomnia-plugin-default-headers |
Yes, Initially, I want such a method to pass authorization header, however I always copy from existing request as walkaround. And maybe this can be a first-class function but not a plugin. Previously, I always copy from existing request, but often with something I don't want. |
@gschier and you've mismatched |
@wonderbeyond for authentication, you probably want to follow #447 |
I've tried using the plug-in, but it does not seem to create any UI changes for me to define my default header for all my collection. How should it be used? |
Overview
Currently I am passing the headers like Accept, Authorization, etc for each one of the requests separately. Is there a way to add them at the folder level, so that I don't have to pass them every time.
The objective is to avoid passing it every time and rather the request inherit the parent folder's settings.
It would also be useful to override the parent folder's headers if the request had the same header.
Thanks
The text was updated successfully, but these errors were encountered: