Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Default headers by domain #1537

Open
ohshazbot opened this issue Oct 30, 2023 · 1 comment
Open

Default headers by domain #1537

ohshazbot opened this issue Oct 30, 2023 · 1 comment
Labels
enhancement New feature or enhancement new Needs triage. Comments are welcome!

Comments

@ohshazbot
Copy link

Checklist

  • [X ] I've searched for similar feature requests.

Enhancement request

I would like the ability to configure a default set of headers to use on a per domain basis, such that if I make a request against a domain, the headers per my configuration get included without me having to adjust the CLI command


Problem it solves

I'm working on a project where we are currently playing with a few different domains. I have a different set of credentials for the different domains, so whenever I am exercising an API, I have to muck around with both the domain URL as well as the headers I'm including. I would love to streamline the amount of things I have to muck with to change the target of my request and I think the best way to do this would be the ability to specify headers on a per-domain basis in my config file.

I am open to alternatives, but for me it boils down to trying to widdle down modifying a domain + header to modifying a single value for me to retarget a request (including updating the credentials I shouldbe using)


Additional information, screenshots, or code examples

Currently requests look like this http get http://0.0.0.0:6543/staging/7 "x-ob-api: $LOCAL_API_KEY" and http get https://devapi.domain.com/staging/618 "x-ob-api: $DEV_API_KEY" and I would like to be able to so something as straightforward as http get http://0.0.0.0:6543/staging/7 (with appropriate configuration). If there's a desire for something more encompassing or to get away from concerns with domain parsing (I don't think there is, but just in case) something like http get --domain dev /rest/of/path could be an option, but I think the rest of the url starts to get a bit weird there, but could be just me.

@ohshazbot ohshazbot added enhancement New feature or enhancement new Needs triage. Comments are welcome! labels Oct 30, 2023
@aroraprince
Copy link

Looks like 1568 might share the same solution.
We should be able to provide a static set of headers in the config to be used per site.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or enhancement new Needs triage. Comments are welcome!
Projects
None yet
Development

No branches or pull requests

2 participants