mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
29
libs/platform/http_uploader.hpp
Normal file
29
libs/platform/http_uploader.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "platform/http_payload.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace platform
|
||||
{
|
||||
class HttpUploader
|
||||
{
|
||||
public:
|
||||
struct Result
|
||||
{
|
||||
int32_t m_httpCode = 0;
|
||||
std::string m_description;
|
||||
};
|
||||
|
||||
HttpUploader() = delete;
|
||||
explicit HttpUploader(HttpPayload const & payload) : m_payload(payload) {}
|
||||
HttpPayload const & GetPayload() const { return m_payload; }
|
||||
Result Upload() const;
|
||||
|
||||
private:
|
||||
HttpPayload const m_payload;
|
||||
};
|
||||
} // namespace platform
|
||||
Reference in New Issue
Block a user