v0.2.0
·
21 commits
to master
since this release
This release is not backwards compatible with v0.1.0. Please refer to the README for detailed information about the new interface.
- The
asyncgi::Apphas been replaced with theasyncgi::IOservice. The factory functionsmakeApp,makeServer,makeClient,makeTimer, andmakeAsioDispatcherhave been removed. Now, all entities are created on the stack and take a reference to anasyncgi::IOobject in their constructors.
Before:
auto app = asyncgi::makeApp();
auto serverPtr = app->makeServer();
After:
auto io = asyncgi::IO{};
auto server = asyncgi::Server{io};
-
The
asyncgi::RequestProcessorbase class has been removed. Now, any callable with a compatible signature ofvoid(const asyncgi::Request&, asyncgi::Response&)can be used for request processing. -
The
asyncgi::Routernow allows passing regular expression capturing group values to the arguments of registered request processors.
router.route(asyncgi::rx{"/page/(\\d)")`).process([](int pageNumber, const asyncgi::Request&, asyncgi::Response&){ ... });
- The route context is no longer embedded in the
asyncgi::Responseobject. Instead, it is passed as the last argument to the request processor.
auto router = asyncgi::Router<Context>{};
router.route().process([](const asyncgi::Request&, asyncgi::Response&, Context& context){ ... });
- The
asyncgi::RouteSpecificationhas been renamed toasyncgi::RouteMatcher. - The
TimerModeenum has been replaced with thestartPeriodic()timer method. - Windows support has been added, along with functional tests and CI configuration.
- Compatibility with Boost.Asio has been added.