mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Multiple merge fixes, rebase, working Https::GET
This commit is contained in:
@@ -21,6 +21,7 @@ struct Version {
|
||||
uint8_t minor;
|
||||
uint8_t patch;
|
||||
Version(uint8_t major, uint8_t minor, uint8_t patch);
|
||||
Version(const std::array<uint8_t, 3>& v);
|
||||
std::string AsString();
|
||||
};
|
||||
|
||||
@@ -81,8 +82,8 @@ public:
|
||||
static std::string GetBackup2Hostname() { return "backup2.beammp.com"; }
|
||||
static std::string GetBackendUrlForSocketIO() { return "https://backend.beammp.com"; }
|
||||
static void CheckForUpdates();
|
||||
static std::array<int, 3> VersionStrToInts(const std::string& str);
|
||||
static bool IsOutdated(const std::array<int, 3>& Current, const std::array<int, 3>& Newest);
|
||||
static std::array<uint8_t, 3> VersionStrToInts(const std::string& str);
|
||||
static bool IsOutdated(const Version& Current, const Version& Newest);
|
||||
|
||||
private:
|
||||
static inline std::string mPPS;
|
||||
@@ -163,4 +164,4 @@ void LogChatMessage(const std::string& name, int id, const std::string& msg);
|
||||
std::string Comp(std::string Data);
|
||||
std::string DeComp(std::string Compressed);
|
||||
|
||||
std::string GetPlatformAgnosticErrorString();
|
||||
std::string GetPlatformAgnosticErrorString();
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
namespace Http {
|
||||
std::string GET(const std::string& host, int port, const std::string& target, unsigned int* status = nullptr);
|
||||
std::string POST(const std::string& host, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, bool json, int* status = nullptr);
|
||||
std::string POST(const std::string& host, int port, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, const std::string& ContentType, unsigned int* status = nullptr);
|
||||
namespace Status {
|
||||
std::string ToString(int code);
|
||||
}
|
||||
}
|
||||
const std::string ErrorString = "-1";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user