Crafter.Network/interfaces/Crafter.Network-ClientHTTP.cppm

38 lines
1.2 KiB
Text
Raw Permalink Normal View History

2025-11-02 15:00:53 +01:00
/*
Crafter®.Network
Copyright (C) 2025 Catcrafts®
Catcrafts.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
export module Crafter.Network:ClientHTTP;
import std;
import :ClientTCP;
import :HTTP;
namespace Crafter {
export class ClientHTTP {
public:
2025-11-03 14:25:51 +01:00
std::string host;
std::uint16_t port;
2025-11-02 15:00:53 +01:00
ClientHTTP(const char* host, std::uint16_t port);
ClientHTTP(std::string host, std::uint16_t port);
2025-11-03 14:25:51 +01:00
HTTPResponse Send(const char* request, std::uint32_t length);
HTTPResponse Send(std::string request);
2025-11-02 15:00:53 +01:00
private:
ClientTCP client;
};
}