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

HEAD request #120

Merged
merged 3 commits into from
May 18, 2017
Merged

HEAD request #120

merged 3 commits into from
May 18, 2017

Conversation

gsquire
Copy link
Contributor

@gsquire gsquire commented May 18, 2017

Closes #109

@dtolnay
Copy link
Member

dtolnay commented May 18, 2017

Nicely done! Only two change I would suggest:

  • In real code I would expect 5, 0 to be accompanied by a quick note about what the numbers mean, so that the reader doesn't have to look up the Duration API to figure out what the timeout is set to. Maybe something like this:

    // Set a 5 second timeout for the request.
    
  • The wording of the intro makes it sound like the timeout is a way to avoid needing to receive a body, but actually the HEAD request is the way to avoid needing to receive a body. Could you rearrange those or move the timeout sentence to its own paragraph to make this clearer?

@gsquire
Copy link
Contributor Author

gsquire commented May 18, 2017

Done. I rephrased it in a different way so it doesn't sound tied together.

@dtolnay dtolnay merged commit fd0e0b4 into rust-lang-nursery:master May 18, 2017
@dtolnay
Copy link
Member

dtolnay commented May 18, 2017

Here it is. Thanks for the great example!

@gsquire gsquire deleted the head-example branch May 18, 2017 16:04
AndyGauge added a commit to AndyGauge/rust-cookbook that referenced this pull request Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants