ipfs-chromium
Loading...
Searching...
No Matches
boost_beast_http.h
1#ifndef BOOST_BEAST_HTTP_H_INCLUDED
2#define BOOST_BEAST_HTTP_H_INCLUDED 1
3
4#include "http_api.h"
5
6#if __has_include(<boost/beast/core/tcp_stream.hpp>)
7#define HAS_BOOST_BEAST 1
8
9#include <boost/asio/io_context.hpp>
10#include <boost/asio/ssl/context.hpp>
11
12namespace ipfs::ctx {
13class BoostBeastHttp : public HttpApi {
14 boost::asio::io_context& io_;
15 boost::asio::ssl::context mutable ssl_ctx_ =
16 boost::asio::ssl::context{boost::asio::ssl::context::sslv23_client};
17
18 public:
19 BoostBeastHttp(boost::asio::io_context&);
20 ~BoostBeastHttp() noexcept override {}
21 Canceller SendHttpRequest(ReqDesc, OnComplete) const override;
22};
23} // namespace ipfs::ctx
24
25#endif // tcp_stream.hpp
26#endif // BOOST_BEAST_HTTP_H_INCLUDED