Skip to content

Conversation

aloussase
Copy link
Contributor

Added a constructor accepting a status code and a r-value returnable. This is convenient so we can return custom returnables along with a status code without having to create an l-value first like this:

class ApiResponse: public crow::returnable
{
  ...
};

// Inside a handler
return crow::response(201, ApiResponse{...});

Before we had to do

ApiResponse response{...};
return crow::response(201, response);

Copy link
Member

@The-EDev The-EDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies for taking so long to review, Everything seems okay. Merging now.

Thank you for your work!

@The-EDev The-EDev merged commit db7f9d9 into CrowCpp:master Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants