Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As there were several issues about this, and people seem to particularly like this example, I updated it so it works again. This should close #5, rust-lang/futures-rs#1462.
There is another issue though that does not get resolved here. This example demonstrates how to asynchronously fetch a different website to return the response to hyper. However the chosen url is particularly poor:
http://www.rust-lang.org/en-US/
.https://www.rust-lang.org/en-US/
, which is a bit confusing, and I think not the intention of the example.I tried to send it to the main page of rust-lang.org in https, but hyper::Client does not seem to support https out of the box. I think it would be best to replace the url with some good example page that does not redirect to https, but I couldn't find one immediately. I also created an examples branch which has the working example as proof it works. I will make a pull request, but I don't know if having examples in this repository is desirable.