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

Add an example for head request #1189

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

lexcao
Copy link
Contributor

@lexcao lexcao commented Jul 23, 2022

Motivation

As #84 add get-head request, adding an example for a GET-or-HEAD handler that special-cases HEAD.
Closes #1175

Solution

Add an handle-head-request example.

examples/handle-head-request/src/main.rs Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
@lexcao
Copy link
Contributor Author

lexcao commented Jul 24, 2022

Hi, @davidpdrsn
Thanks for your suggestion. It's helpful for me.

@jplatte jplatte self-requested a review July 24, 2022 07:38
@lexcao
Copy link
Contributor Author

lexcao commented Jul 25, 2022

Hi, @jplatte
Thanks for your suggestion.
I have added a case.

@davidpdrsn davidpdrsn changed the title Add an example for head request (#1175) Add an example for head request Jul 25, 2022
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
@lexcao
Copy link
Contributor Author

lexcao commented Jul 26, 2022

Hi,
I have fixed some wording.
Thank you!

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than some more wording suggestions, this looks very good now 👍🏼

examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
examples/handle-head-request/src/main.rs Outdated Show resolved Hide resolved
@jplatte jplatte requested a review from davidpdrsn July 26, 2022 15:49
@lexcao lexcao force-pushed the example/head-request branch 2 times, most recently from bb16d94 to 92e08fe Compare July 26, 2022 16:20
Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks :D

@davidpdrsn davidpdrsn enabled auto-merge (squash) July 26, 2022 17:45
@davidpdrsn davidpdrsn disabled auto-merge July 26, 2022 17:45
@davidpdrsn davidpdrsn enabled auto-merge (squash) July 26, 2022 17:46
@davidpdrsn davidpdrsn disabled auto-merge July 26, 2022 17:51
@davidpdrsn
Copy link
Member

@lexcao it seems CI is failing because the dependencies aren't sorted.

As tokio-rs#84 add get-head request, adding an example.
@lexcao
Copy link
Contributor Author

lexcao commented Jul 26, 2022

Hi, @davidpdrsn I just fixed the sorting.
Thank you!

@davidpdrsn davidpdrsn merged commit 3c0778b into tokio-rs:main Jul 26, 2022
@lexcao lexcao deleted the example/head-request branch July 27, 2022 15:41
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.

Add an example for a GET-or-HEAD handler that special-cases HEAD
3 participants