mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-06-14 17:10:37 +02:00
Now that we have that global as_json_ we can use that for the content type.
This commit is contained in:
parent
11cfc50c8a
commit
dc397e0183
|
@ -39,8 +39,7 @@ void HttpStatConnection::wakeup() {
|
|||
td::HttpHeaderCreator hc;
|
||||
hc.init_status_line(200);
|
||||
hc.set_keep_alive();
|
||||
if (!content.empty() && content.data()[0] == '{') {
|
||||
// https://t.me/TDLightChat/1462
|
||||
if (as_json_) {
|
||||
hc.set_content_type("application/json");
|
||||
} else {
|
||||
hc.set_content_type("text/plain");
|
||||
|
|
Loading…
Reference in New Issue
Block a user