From d9bccd80b1932930d0b348b16ba36b9031ec545f Mon Sep 17 00:00:00 2001 From: HansM Date: Sat, 12 Sep 2020 15:27:06 +0200 Subject: [PATCH] Smaller code style fixes. --- src/TelegramBot.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/TelegramBot.cpp b/src/TelegramBot.cpp index c00846d..fe2de26 100755 --- a/src/TelegramBot.cpp +++ b/src/TelegramBot.cpp @@ -12,7 +12,6 @@ TelegramBot::TelegramBot(const char* token, Client &client) { this->token=token; } - void TelegramBot::begin() { if(!client->connected()){ client->connect(HOST, SSL_PORT); @@ -132,13 +131,12 @@ String TelegramBot::postMessage(String msg) { client->println("POST /bot"+String(token)+"/sendMessage"+" HTTP/1.1"); client->println("Host: api.telegram.org"); - client->println("Content-Type: application/json"); - client->println("Connection: close"); - client->print("Content-Length: "); - client->println(msg.length()); - client->println(); - client->println(msg); - + client->println("Content-Type: application/json"); + client->println("Connection: close"); + client->print("Content-Length: "); + client->println(msg.length()); + client->println(); + client->println(msg); return readPayload(); }