mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
First commit with most of the main features implemented. May still need some bug fixes here and there.
18 lines
No EOL
539 B
C++
18 lines
No EOL
539 B
C++
#pragma once
|
|
|
|
#include "constants.hpp"
|
|
|
|
#include <unordered_map>
|
|
|
|
namespace gdpm::http{
|
|
struct response{
|
|
long code = 0;
|
|
std::string body{};
|
|
std::unordered_map<std::string, std::string> headers{};
|
|
};
|
|
|
|
response request_get(const std::string& url, size_t timeout = GDPM_CONFIG_TIMEOUT_MS);
|
|
response request_post(const std::string& url, const char *post_fields="", size_t timeout = GDPM_CONFIG_TIMEOUT_MS);
|
|
response download_file(const std::string& url, const std::string& storage_path, size_t timeout = GDPM_CONFIG_TIMEOUT_MS);
|
|
|
|
} |