Features
- **`APIRouter` Implementation:**
- Introduced the `APIRouter` class to manage routes using RESTful methods (GET, POST, PUT, PATCH, DELETE, etc.) in a modular way.
- Added route decorators for all major HTTP methods in both `MirAPI` and `APIRouter`, enabling more flexible route definitions.
- Implemented the `include_router` method in `MirAPI`, allowing external routers to be seamlessly included, facilitating route composition and better code organization.
- **Class-Based Route Handlers:**
- Added support for class-based route handlers in `MirAPI` and `APIRouter`.
- Route handlers can now be defined as classes with methods corresponding to HTTP methods (e.g., `get`, `post`, `put`, etc.).
- This feature provides a more structured approach to route management and allows for better separation of concerns.
Refactor
- **`find_handler` Method Update in `Router`:**
- Refactored the `find_handler` method to support class-based route handlers.
- Added logic to instantiate handler classes and dynamically resolve the appropriate HTTP method handler (GET, POST, etc.) based on the incoming request.
- Maintained support for function-based route handlers.