| 25 | class HttpClientSession : public std::enable_shared_from_this<HttpClientSession> { |
| 26 | public: |
| 27 | HttpClientSession(asio::io_context &io, const td::IPAddress &addr, HttpCallback::RequestType request_type, |
| 28 | std::string url, std::vector<std::pair<std::string, std::string>> headers, std::string payload, |
| 29 | double timeout, std::unique_ptr<HttpRequestCallback> callback) |
| 30 | : resolver_(io) |
| 31 | , stream_(io) |
| 32 | , addr_(addr) |
| 33 | , request_type_(request_type) |
| 34 | , url_(std::move(url)) |
| 35 | , headers_(std::move(headers)) |
| 36 | , payload_(std::move(payload)) |
| 37 | , timeout_(timeout) |
| 38 | , callback_(std::move(callback)) { |
| 39 | } |
| 40 | |
| 41 | void run() { |
| 42 | self_ = shared_from_this(); |
nothing calls this directly
no outgoing calls
no test coverage detected