ipfs-chromium
http_api.h
1 #ifndef IPFS_CHROMIUM_HTTP_API_H
2 #define IPFS_CHROMIUM_HTTP_API_H
3 
4 #include <ipfs_client/http_request_description.h>
5 #include <functional>
6 
7 namespace ipfs::ctx {
8 class HttpApi {
9  public:
11  using Hdrs = std::function<std::string(std::string_view)>;
12  using OnComplete = std::function<void(std::int16_t, std::string_view, Hdrs)>;
13  using Canceller = std::function<void()>;
14  virtual Canceller SendHttpRequest(ReqDesc, OnComplete cb) const = 0;
15 
16  virtual ~HttpApi() noexcept {}
17 };
18 } // namespace ipfs::ctx
19 
20 #endif // IPFS_CHROMIUM_HTTP_API_H
Definition: http_api.h:8
Definition: http_request_description.h:12