Releases: kamchatka-volcano/whaleroute
Releases · kamchatka-volcano/whaleroute
v3.1.0
v3.0.0
TResponseValue
template parameter was replaced withTResponseConverter
.
Before this change we could register the response value types which can be used to constructTResponse
objects and useRoute::set
method to provide this values. It was also required to overload the virtual methodsetResponseValue
and provide the construction logic ofTResponse
objects from theTRsponseValue
:
class Router : public whaleroute::RequestRouter<Request, Response, std::string>{
void setResponseValue(Response& response, const std::string& value)
{
response.send(value);
}
///...
};
From now on it's necessary to provide a class type with callable signature void(Response& response, const TResponseValue& value)
in the TResponseConverter
template argument instead of specifying the response value, the setResponseValue
method was also removed;
struct ResponseSetter{
void operator()(Response& response, const std::string& value)
{
response.send(value);
}
};
class Router : public whaleroute::RequestRouter<Request, Response, ResponseSetter>{ };
- Route matchers doesn't take the reference to the response object anymore
Before:
template<>
struct RouteMatcher<Request::Method> {
bool operator()(Request::Method value, const Request& request, Response&) const
{
return value == request.method;
}
};
Now:
template<>
struct RouteMatcher<Request::Method> {
bool operator()(Request::Method value, const Request& request) const
{
return value == request.method;
}
};
v2.0.0
- The
RequestProcessor
interface and theTRequestProcessor
template parameter have been removed. Now, the request processor can be any callable with the signaturevoid(const TRequest&, TResponse&)
. - The
TRequestType
template parameter has been removed. Now, the request type can be registered using theroute matchers. - All authorization functionality has been removed. It is now up to the user to implement it using the route matchers and the route context.
- The regular expression support has been updated. Now, the values of regular expression capturing groups can be passed to the request processor parameters.
[Maintenance]
- Fixed issues on MSVC and gcc compilers
- Added GitHub Actions configuration for CI pipeline
- Added
clang-format
config
v1.0.3
-fixed invalidation of routes
v1.0.2
- fixed specification of any request type in route() method taking a regular expression
v1.0.1
- fixed compiler warnings
- fixed specification of any request type in
route()
method
v1.0.0
Initial version