mirror of
https://github.com/zerotier/ratpack.git
synced 2026-05-22 16:27:23 -07:00
Add a framework prelude import
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use http::{Request, Response, StatusCode};
|
||||
use hyper::Body;
|
||||
use ratpack::{app::App, compose_handler, Error, HTTPResult, Params, ServerError};
|
||||
use ratpack::prelude::*;
|
||||
|
||||
async fn validate_authtoken(
|
||||
req: Request<Body>,
|
||||
|
||||
@@ -73,3 +73,7 @@ where
|
||||
/// with [std::option::Option::None] as the [http::Response], a 500 Internal Server Error will be
|
||||
/// returned.
|
||||
pub type HTTPResult = Result<(Request<hyper::Body>, Option<Response<hyper::Body>>), Error>;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{app::App, compose_handler, Error, HTTPResult, Params, ServerError};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user