JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
DeleteRequest.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 04/03/2020.
3 //
4 
5 #ifndef JODA_DELETEREQUEST_H
6 #define JODA_DELETEREQUEST_H
7 
8 #include <httplib.h>
10 
11 namespace joda::network::apiv2 {
12 
18  public:
24  static void registerEndpoint(const std::string &prefix,
25  httplib::Server &server);
26 
32  static httplib::Server::Handler getHandler(const std::string &prefix = "");
33 
34  private:
35  static constexpr auto endpoint = "/delete";
36 
37  static void readParams(const httplib::Request &req, httplib::Response &res);
38  static void deleteSource(const httplib::Request &req, httplib::Response &res,
39  const std::string &name);
40  static void deleteResult(const httplib::Request &req, httplib::Response &res,
41  unsigned long id);
42 
43  static void success_(httplib::Response &res);
44 };
45 
46 } // namespace joda::network::apiv2
47 
48 #endif // JODA_DELETEREQUEST_H
Definition: DeleteRequest.h:17
static void registerEndpoint(const std::string &prefix, httplib::Server &server)
Definition: DeleteRequest.cpp:8
static httplib::Server::Handler getHandler(const std::string &prefix="")
Definition: DeleteRequest.cpp:57
Definition: API.h:10