mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-22 06:30:44 +00:00
Made regionhandler handled on http level
This commit is contained in:
+2
-2
@@ -39,8 +39,8 @@
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace Http {
|
||||
std::string GET(const std::string& url, unsigned int* status = nullptr);
|
||||
std::string POST(const std::string& url, const std::string& body, const std::string& ContentType, unsigned int* status = nullptr, const std::map<std::string, std::string>& headers = {});
|
||||
std::string GET(std::string url, unsigned int* status = nullptr, const bool& redirect = true);
|
||||
std::string POST(std::string url, const std::string& body, const std::string& ContentType, unsigned int* status = nullptr, const std::map<std::string, std::string>& headers = {}, const bool& redirect = true);
|
||||
namespace Status {
|
||||
std::string ToString(int code);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
RegionHandler() = delete;
|
||||
static void TopLevelDomainFailed();
|
||||
static std::string RegionToTopLevelDomain();
|
||||
static std::string RedirectURL(const std::string &URL);
|
||||
private:
|
||||
static inline unsigned int mRegionIndex { 0 };
|
||||
const static inline std::array<std::string, 2> mValidTLDs {"beammp.com", "beammp.ru"};
|
||||
|
||||
Reference in New Issue
Block a user