-
Notifications
You must be signed in to change notification settings - Fork 1
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
easier ability to read all headers #16
Comments
This crate would only use Easy2 since it is easier to handle when implementing async operations than Easy. I am open for a pull request to improve this crate. I am still learning about https://github.com/alexcrichton/curl-rust. We can ask them if they can add it for Easy2. |
We could also ask the creators of curl-rust to have an interface to get all header responses. As of the moment, it seems we can only access it one by one. |
Ok. Added a issue for starting a discussion there: alexcrichton/curl-rust#544 |
Closing this issue as is. Seems I can just implement my own collector and then all is good, as explained here: alexcrichton/curl-rust#544 (comment) |
Currently only content-type header is read. That said, this library has made it a lot easier for me to integrate libcurl into my project so thanks a lot for your efforts.
That said, if it fits within the scope of your project, would probably be useful if one can access all headers from a response. For now this is how I've done it:
show_headers(true)
httparse
to parse the responseAnd as such I have access to all headers.
This is however pretty fragile and works only because I am for now only using it on one website and only for HTTP/1.1
What do you think. In the
Easy
client there is a way to enable a callback to get all headers.Easy2
doesn't seem to have this.Does supporting this fit within your project or is this out of scope?
Either way, thanks a lot!
The text was updated successfully, but these errors were encountered: