You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the best way to send HTML via Restinio as a file or written out as in the examples?
The below is working for me. What would be the best way to pass the parameter "test" and to make an SQL query and have the data returned into the browser?
I think "the best way" depends on your case. If you have to return just static HTML content then sendfile would be a better choice. But if you have to integrate some dynamic data into your HTML then you have to use set_body or append_body methods of response builder (maybe with help of some HTML template generators like jinja2cpp (a list of C++ HTML template engines can be found here)).
An example of performing database requests during the request processing can be found here.
Is the best way to send HTML via Restinio as a file or written out as in the examples?
The below is working for me. What would be the best way to pass the parameter "test" and to make an SQL query and have the data returned into the browser?
The text was updated successfully, but these errors were encountered: