CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
RESTAPI.h File Reference

XML-defined REST API parsing: turn HTTP requests (or DataMessages) into validated RESTRequest objects. More...

#include "NetworkProtocols.h"
#include "xml_parser.h"
#include "jsmn.h"
Include dependency graph for RESTAPI.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cmlabs::RESTParam
 Definition of one parameter of a REST request, as declared in the API XML. More...
class  cmlabs::RESTRequest
 A parsed and validated REST request with typed access to its parameters. More...
class  cmlabs::RESTParser
 Parses and validates incoming requests against an XML REST API definition. More...
class  cmlabs::RESTHTTPCall
 Definition of an outbound HTTP call template from the REST API XML. More...

Namespaces

namespace  cmlabs

Detailed Description

XML-defined REST API parsing: turn HTTP requests (or DataMessages) into validated RESTRequest objects.

A RESTParser is initialised with an XML API definition (<restapi>...) describing named requests and their typed parameter sets. Incoming HTTPRequest objects (from NetworkProtocols.h) or internal DataMessages are then parsed and validated against that definition, producing RESTRequest instances whose typed getters expose the extracted parameters. RESTHTTPCall describes outbound HTTP calls generated from a request (templated URL, headers and body).

Definition in file RESTAPI.h.