We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 middleware for every request
server.utilize(middleware! { | request | println!("logging request from middleware! macro: {:?}", request.origin.uri); });
Handle a route
server.get('/', middleware!("Yes, got it!");
start server
let _ = server.listen("127.0.0.1:8080");
visit http://localhost:8080, get corrent response from server, and terminal display:
http://localhost:8080
logging request from middleware! macro: AbsolutePath("/")
But browser got 404 while visiting with a domain(by SwitchyOmega chrome plugin), the HTTP request header begin with:
GET http://xxx.com/ HTTP/1.1
And log middleware output the message:
logging request from middleware! macro: AbsoluteUri("http://xxx.com/")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add middleware for every request
Handle a route
start server
visit
http://localhost:8080
, get corrent response from server, and terminal display:But browser got 404 while visiting with a domain(by SwitchyOmega chrome plugin), the HTTP request header begin with:
And log middleware output the message:
The text was updated successfully, but these errors were encountered: