mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-28 15:57:47 +02:00
refactor service registration process; unify services and resources
This commit is contained in:
@@ -149,9 +149,10 @@ impl HttpMessage for HttpRequest {
|
||||
/// }
|
||||
///
|
||||
/// fn main() {
|
||||
/// let app = App::new().resource("/users/:first", |r| {
|
||||
/// r.route(web::get().to(index))
|
||||
/// });
|
||||
/// let app = App::new().service(
|
||||
/// web::resource("/users/{first}").route(
|
||||
/// web::get().to(index))
|
||||
/// );
|
||||
/// }
|
||||
/// ```
|
||||
impl<P> FromRequest<P> for HttpRequest {
|
||||
|
Reference in New Issue
Block a user