Ошибка при отправке запроса на C++(socket)?

При попытке отправить запрос на API Telegram, сервер постоянно вовзращает 400 ошибку(400 Bad Request)? Как можно исправить? Code:

#include <iostream>
#include <WinSock2.h>
#include <string>
#define PORT 80

#pragma warning(disable: 4996)

#pragma comment(lib, "ws2_32.lib")

using namespace std;

const char* link = "api.telegram.org";

int main()
{

    setlocale(LC_ALL, "rus");

    WSADATA wsaData;
    WORD Dllver = MAKEWORD(2, 1);

    
    string post = "POST /botTOKEN/getMe HTTP/1.1\r\nHost: api.telegram.org\r\n";
    post += "Content-Type: application/x-www-form-urlencoded\r\n";
    post += "Connection: close\r\n\r\n";

    char msg[4096];

    memset(msg, 0, 4096);

    if (WSAStartup(Dllver, &wsaData) == 0)
    {
        SOCKADDR_IN addr;
        addr.sin_addr.s_addr = *((unsigned long*)gethostbyname(link)->h_addr);
        addr.sin_port = htons(PORT);
        addr.sin_family = PF_INET;

        SOCKET connection = socket(PF_INET, SOCK_STREAM, NULL);

        if (connection != NULL)
        {
            if (connect(connection, (SOCKADDR*)&addr, sizeof(addr)) == 0)
            {
                cout << "All good!" << endl;

                if (send(connection, post.c_str(), post.size(), NULL) == SOCKET_ERROR)
                {
                    cout << "Send error" << endl;
                }

                recv(connection, msg, sizeof(msg), NULL);

                cout << msg << endl;
            }
            else
            {
                cout << "Connection error";
                exit(EXIT_FAILURE);
            }
        }
        closesocket(connection);
        WSACleanup();
    }
    else
        exit(EXIT_FAILURE);

    return EXIT_SUCCESS;
}

Ответ от сервера:
введите сюда описание изображения


Ответы (0 шт):