$darkmode
cloe::handler::FromConf Class Reference

#include <handler.hpp>

Public Member Functions

 FromConf (fable::Confable *ptr, bool query_map_as_json=true)
 
void operator() (const cloe::Request &q, cloe::Response &r)
 

Detailed Description

The FromConf handler tries to convert its input to a Conf.

Requests are handled in the following way:

  • If the request uses the POST method, the body is parsed as JSON and the from_json function is called for the type.
  • If the request uses the GET method and supplies a query map, then the query map is converted to JSON and passed in (this behavior enabled by default).
  • Otherwise, return the schema usage of the Confable with an error.

The documentation for this class was generated from the following files: