Skip to content

Commit

Permalink
add teapot response body
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmanczak committed Jul 14, 2024
1 parent 0f50076 commit 449fce2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/teapot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ pub fn route() -> Router {
.route("/brew", get(refuse_to_brew_coffee()))
}

fn refuse_to_brew_coffee() -> StatusCode {
StatusCode::IM_A_TEAPOT
static TEAPOT_RESPONSE: &str = "I'm a teapot.";

fn refuse_to_brew_coffee() -> (StatusCode, &'static str) {
(StatusCode::IM_A_TEAPOT, TEAPOT_RESPONSE)
}

0 comments on commit 449fce2

Please sign in to comment.