Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

readme is wrong #36

Closed Milerius closed 5 years ago

Milerius commented 5 years ago

in the example section i think the good solution is:

 http_router->non_matched_request_handler(
                    [](auto req) {
                        return req->create_response(restinio::status_not_found()).set_body("Not Found").done();
                    });

create_response take only one argument on my machine (0.5.1 full version)

https://github.com/Stiffstream/restinio/blob/master/dev/restinio/request_handler.hpp#L78

eao197 commented 5 years ago

You're right. Fix is now in the master branch.

PS. The master branch now has a fix for the warning from your PR (https://github.com/Stiffstream/restinio/pull/35). Tag 0.5.1.1 will be created later.