-
Notifications
You must be signed in to change notification settings - Fork 102
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
Alternative for cURL --resolve flag #317
Comments
This is something we can easily support by making use of reqwest's Would you be interested in opening a PR for adding this feature? |
Sorry, I do not have the enough experience with Rust to undertake something like this. |
From reqwest docs:
So would it be okay to use this flag with the |
Hmm, that's unfortunate. I prefer us to stay compatible with cURL's |
In the For example, if we have a web page at
|
I've tried to use the An option seems to be to develop a custom resolver by using the |
I meant that I wanted to resolve |
@iammatthi After rereading your message and the docs, I'm realising that the port number in
The resolver passed to @JoyceBabu How useful do you find a
|
I have never had a situation where I had to resolve the hostname to different ip address based on the port number. But I think it would be better to follow the syntax of curl, even if the port number is silently ignored. This allows compatibility with curl, and at the same time makes it possible to implement this properly, if there ever is a need for it. |
Sounds good. In that case, let's support both |
You can't usually plug curl flags into xh/HTTPie anyway, so I don't think that kind of compatibility has a lot of upside. Maybe if we detect the curl syntax we can suggest the port-less syntax in the error message? If we support it now with broken behavior then implementing it properly later would technically be a compatibility break. |
Please implement in any form, so that feature can be used. 😇 |
Can I humbly request a release now that this issue is merged? Thanks! |
@rivasdiaz the plan is to cut a new release this weekend. In the meantime, you can build xh from source and test the feature. |
Is there an alternative for the
--resolve
flag of cURL? Setting theHost
header alone does not work when the target server is using SNI. Inhttpie
there is a feature request for this, but is pending on an upstream PR.httpie/cli#99
The text was updated successfully, but these errors were encountered: