ZeroEQ  0.9.0
ZeroEQ - Zero Event Queue
http/types.h
1 
2 /* Copyright (c) 2017, Human Brain Project
3  * Stefan.Eilemann@epfl.ch
4  */
5 
6 #pragma once
7 
8 #include <zeroeq/types.h>
9 
10 #include <functional>
11 #include <future>
12 
13 namespace zeroeq
14 {
20 namespace http
21 {
22 class Server;
23 struct Request;
24 struct Response;
25 
27 using PUTFunc = std::function<bool()>;
28 
30 using PUTPayloadFunc = std::function<bool(const std::string&)>;
31 
33 using GETFunc = std::function<std::string()>;
34 
36 using RESTFunc = std::function<std::future<Response>(const Request&)>;
37 }
38 }
std::function< bool()> PUTFunc
HTTP PUT callback w/o payload, return reply success.
Definition: http/types.h:27
std::function< std::string()> GETFunc
HTTP GET callback to return JSON reply.
Definition: http/types.h:33
std::function< bool(const std::string &)> PUTPayloadFunc
HTTP PUT callback w/ JSON payload, return reply success.
Definition: http/types.h:30
std::function< std::future< Response >(const Request &)> RESTFunc
HTTP REST callback with Request parameter returning a Response future.
Definition: http/types.h:36
HTTP Request with method, path and body.
Definition: request.h:50
Publish-subscribe and request-reply.
Definition: client.h:10