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 {
11 class HttpApi {
12  public:
14  using Hdrs = std::function<std::string(std::string_view)>;
15  using OnComplete = std::function<void(std::int16_t, std::string_view, Hdrs)>;
16  using Canceller = std::function<void()>;
17  virtual Canceller SendHttpRequest(ReqDesc, OnComplete cb) const = 0;
18 
19  virtual ~HttpApi() noexcept {}
20 };
21 } // namespace ipfs::ctx
22 
23 #endif // IPFS_CHROMIUM_HTTP_API_H
Definition: http_api.h:11
Definition: http_request_description.h:12