Skip to content
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: Support special-use domain names like localhost. #1458

Open
1 task done
joeblubaugh opened this issue Dec 21, 2022 · 2 comments
Open
1 task done

Feature Request: Support special-use domain names like localhost. #1458

joeblubaugh opened this issue Dec 21, 2022 · 2 comments
Labels
enhancement New feature or enhancement new Needs triage. Comments are welcome!

Comments

@joeblubaugh
Copy link

Checklist


Enhancement request

HTTPie should resolve special domain names per RFC6761, unless HTTPie uses a name resolution library that isn't part of the code base. According to the RFC:

Name resolution APIs and libraries SHOULD recognize localhost
names as special and SHOULD always return the IP loopback address
for address queries and negative responses for all other query
types. Name resolution APIs SHOULD NOT send queries for
localhost names to their configured caching DNS server(s).


Problem it solves

I use k3d to develop software. It assigns localhost domains to Services, for example: grafana.k3d.localhost:8080. If httpie resolved .localhost domain names as the loopback address I could use it for scripting in my local development environment. As it stands, I'm using CURL, but httpie is faster and more pleasant to write.


Additional information, screenshots, or code examples

Curl has implemented support for this somewhat recently: curl/curl#9296

@joeblubaugh joeblubaugh added enhancement New feature or enhancement new Needs triage. Comments are welcome! labels Dec 21, 2022
@osdiab
Copy link

osdiab commented Mar 31, 2023

@jakubroztocil @isidentical any chance this can be considered by the maintainers? I found this counterintuitive that it didn't work, sounds like per the RFC linked above this might make sense to support. Thanks!

Ousret added a commit to Ousret/httpie that referenced this issue May 24, 2024
@Ousret

This comment was marked as spam.

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

Successfully merging a pull request may close this issue.

3 participants