JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
JodaSourceRequest.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 03/03/2020.
3 //
4 
5 #ifndef JODA_JODASOURCEREQUEST_H
6 #define JODA_JODASOURCEREQUEST_H
7 #include <httplib.h>
9 #include <string>
10 
11 namespace joda::network::apiv2 {
12 
18  public:
24  static void registerEndpoint(const std::string &prefix,
25  httplib::Server &server);
26 
27  private:
28  static constexpr auto endpoint = "/sources";
29  static constexpr auto temp_endpoint = "/results";
30 
31  static void sendSources(const httplib::Request &req, httplib::Response &res);
32  static void sendTemporaries(const httplib::Request &req,
33  httplib::Response &res);
34  static std::string storageToJSON(const JSONStorage &storage,
35  unsigned long id = 0);
36 };
37 
38 } // namespace joda::network::apiv2
39 
40 #endif // JODA_JODASOURCEREQUEST_H
Definition: JSONStorage.h:24
Definition: JodaSourceRequest.h:17
static void registerEndpoint(const std::string &prefix, httplib::Server &server)
Definition: JodaSourceRequest.cpp:12
Definition: API.h:10