Fawkes API
Fawkes Development Version
|
REST parameters to pass to handlers. More...
#include <rest_api.h>
Public Member Functions | |
WebviewRestParams () | |
Constructor. More... | |
std::string | path_arg (const std::string &what) |
Get a path argument. More... | |
std::string | query_arg (const std::string &what) |
Get a query argument. More... | |
bool | has_query_arg (const std::string &what) |
Check if query argument is set. More... | |
bool | pretty_json () |
Is pretty-printed JSON enabled? More... | |
void | set_pretty_json (bool pretty) |
Enable or disable pretty printed results. More... | |
Friends | |
class | WebviewRestApi |
REST API can call private methods. More... | |
REST parameters to pass to handlers.
Definition at line 124 of file rest_api.h.
|
inline |
Constructor.
Definition at line 131 of file rest_api.h.
|
inline |
Check if query argument is set.
Retrieves a named query argument that was passed in the URL, e.g., retrieve "pretty" for "?pretty".
what | what to check |
Definition at line 174 of file rest_api.h.
Referenced by fawkes::WebviewRestApi::add_handler().
|
inline |
Get a path argument.
Retrieves a named argument that was a token in the registration URL, e.g., retrieve "id" for "/item/{id}".
what | what to retrieve |
Definition at line 142 of file rest_api.h.
|
inline |
Is pretty-printed JSON enabled?
Definition at line 183 of file rest_api.h.
Referenced by fawkes::WebviewRestApi::add_handler().
|
inline |
Get a query argument.
Retrieves a named query argument that was passed in the URL, e.g., retrieve "pretty" for "?pretty=true".
what | what to retrieve |
Definition at line 158 of file rest_api.h.
|
inline |
Enable or disable pretty printed results.
Note that this only works when using the generated API interface and classes which support the "pretty" flag.
pretty | true to enable, false to disable |
Definition at line 194 of file rest_api.h.
Referenced by fawkes::WebviewRestApi::add_handler().
|
friend |
REST API can call private methods.
Definition at line 127 of file rest_api.h.