-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
use axum::{ | ||
Json, | ||
response::{Html, IntoResponse}, | ||
http::{StatusCode, Uri, header::{self, HeaderMap, HeaderName}}, | ||
}; | ||
|
||
// this is a handler, a function that is used in a Router | ||
// integrate new functionality here: | ||
// TODO: A | B example: serve a stream. roadmap - show webcam on laptop screen. | ||
// A handler is an async function that accepts zero or more “extractors” as arguments and returns something that can be converted into a response. | ||
pub async fn say_hello() -> String { | ||
// integrate new functionality here: | ||
return "Hello!!!".to_string(); | ||
} | ||
|
||
pub async fn html() -> Html<&'static str> { | ||
Html("<p>Hello, World!</p>") | ||
} | ||
// stream. | ||
// roadmap - show webcam on laptop screen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters