4#ifndef _Stroika_Framework_WebService_Server_VariantValue_h_
5#define _Stroika_Framework_WebService_Server_VariantValue_h_ 1
7#include "Stroika/Frameworks/StroikaPreComp.h"
9#include "Stroika/Foundation/Containers/Mapping.h"
10#include "Stroika/Foundation/Containers/Sequence.h"
12#include "Stroika/Foundation/DataExchange/ObjectVariantMapper.h"
16#include "Stroika/Frameworks/WebServer/Request.h"
17#include "Stroika/Frameworks/WebServer/RequestHandler.h"
18#include "Stroika/Frameworks/WebServer/Response.h"
20#include "Stroika/Frameworks/WebService/Server/Basic.h"
26namespace Stroika::Frameworks::WebService::Server::VariantValue {
39 using WebServer::Request;
40 using WebServer::Response;
57 Mapping<String, VariantValue> PickoutParamValuesFromURL (
const Request& request);
58 Mapping<String, VariantValue> PickoutParamValuesFromURL (
const URI& url);
83 Mapping<String, VariantValue> PickoutParamValuesFromBody (Request& request);
84 Mapping<String, VariantValue> PickoutParamValuesFromBody (
const BLOB& body,
const optional<InternetMediaType>& bodyContentType);
106 Mapping<String, VariantValue> PickoutParamValues (Request& request);
120 VariantValue CombineWebServiceArgsAsVariantValue (Request& request);
129 Iterable<VariantValue> PickOutNamedArguments (
const Iterable<String>& argNames,
const Mapping<String, VariantValue>& argumentValueMap);
130 Iterable<VariantValue> PickOutNamedArguments (
const Iterable<String>& argNames,
const VariantValue& argumentValueMap);
186 template <
typename RETURN_TYPE,
typename... ARG_TYPES>
188 const function<RETURN_TYPE (ARG_TYPES...)>& f);
189 template <
typename RETURN_TYPE,
typename... ARG_TYPES>
191 const Iterable<String>& paramNames,
const function<RETURN_TYPE (ARG_TYPES...)>& f);
203 void WriteResponse (Response& response,
const WebServiceMethodDescription& webServiceDescription);
204 void WriteResponse (Response& response,
const WebServiceMethodDescription& webServiceDescription,
const Memory::BLOB& responseValue);
205 void WriteResponse (Response& response,
const WebServiceMethodDescription& webServiceDescription,
const VariantValue& responseValue);
214#include "VariantValue.inl"
A generalization of a vector: a container whose elements are keyed by the natural numbers.
ObjectVariantMapper can be used to map C++ types to and from variant-union types, which can be transp...
Simple variant-value (case variant union) object, with (variant) basic types analogous to a value in ...
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
this represents a HTTP request object for the WebServer module