mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-06-07 05:38:16 +02:00
Made as_json a attribute of the HttpStatConnection as requested.
This commit is contained in:
parent
b0de46be92
commit
11cfc50c8a
|
@ -24,8 +24,8 @@ void HttpStatConnection::handle(td::unique_ptr<td::HttpQuery> http_query,
|
|||
future.set_event(td::EventCreator::yield(actor_id()));
|
||||
LOG(DEBUG) << "SEND";
|
||||
td::Parser url_path_parser(http_query->url_path_);
|
||||
bool as_json = url_path_parser.try_skip("/json");
|
||||
send_closure(client_manager_, &ClientManager::get_stats, std::move(promise), http_query->get_args(), as_json);
|
||||
as_json_ = url_path_parser.try_skip("/json");
|
||||
send_closure(client_manager_, &ClientManager::get_stats, std::move(promise), http_query->get_args(), as_json_);
|
||||
result_ = std::move(future);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ class HttpStatConnection : public td::HttpInboundConnection::Callback {
|
|||
void wakeup() override;
|
||||
|
||||
private:
|
||||
bool as_json_;
|
||||
td::FutureActor<td::BufferSlice> result_;
|
||||
td::ActorId<ClientManager> client_manager_;
|
||||
td::ActorOwn<td::HttpInboundConnection> connection_;
|
||||
|
|
Loading…
Reference in New Issue
Block a user