a simple multithreaded webserver
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
579 B

#pragma once
#include <string>
#include <stdexcept>
namespace pEp
{
class HttpError : public std::runtime_error
{
public:
HttpError(unsigned error_code, const std::string& error_message);
};
class Webclient
{
public:
Webclient(const std::string& server_name, unsigned port=80)
: m_server_name{server_name}
, m_port{port}
{}
std::string get(const std::string& url);
private:
const std::string& m_server_name;
const unsigned m_port;
};
} // end of namespace pEp