Skip to content

Releases: kamchatka-volcano/whaleroute

v3.1.0

11 Jun 19:35
Compare
Choose a tag to compare
  • Updated seal_lake to v0.2.0, now the CPM.cmake package manager is used to download dependencies. The variable CPM_SOURCE_CACHE can be set to an arbitrary directory to speed up CMake reconfiguration.
  • Fixed build on MSVC 1929;

v3.0.0

04 Jan 17:26
Compare
Choose a tag to compare
  • TResponseValue template parameter was replaced with TResponseConverter.
    Before this change we could register the response value types which can be used to construct TResponse objects and use Route::set method to provide this values. It was also required to overload the virtual method setResponseValue and provide the construction logic of TResponse objects from the TRsponseValue:
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>{ };     

Readme


  • 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;
    }
};

Readme

v2.0.0

01 Jul 11:51
Compare
Choose a tag to compare
  • The RequestProcessor interface and the TRequestProcessor template parameter have been removed. Now, the request processor can be any callable with the signature void(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

21 Aug 13:54
Compare
Choose a tag to compare

-fixed invalidation of routes

v1.0.2

21 Aug 12:27
Compare
Choose a tag to compare
  • fixed specification of any request type in route() method taking a regular expression

v1.0.1

13 Jul 20:43
Compare
Choose a tag to compare
  • fixed compiler warnings
  • fixed specification of any request type in route() method

v1.0.0

23 Jan 16:12
Compare
Choose a tag to compare

Initial version