2020-09-20 01:21:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-03-16 02:04:21 +00:00
|
|
|
constexpr int ON = 1;
|
|
|
|
constexpr int OFF = 0;
|
2020-09-20 01:21:28 +01:00
|
|
|
|
2021-02-06 17:24:47 +00:00
|
|
|
#include "json.hpp"
|
2020-09-20 01:21:28 +01:00
|
|
|
|
2021-03-16 02:04:21 +00:00
|
|
|
namespace download {
|
|
|
|
|
|
|
|
std::vector<std::uint8_t> downloadFile(const char *url, const char *output = "", int api = OFF);
|
|
|
|
std::vector<std::pair<std::string, std::string>> getLinks(const char *url);
|
|
|
|
std::string fetchTitle(const char *url);
|
|
|
|
std::string downloadPage(const char* url, std::vector<std::string> headers = {}, std::string body = "");
|
|
|
|
std::vector<std::uint8_t> downloadPageBinary(const char* url, std::vector<std::string> headers = {}, std::string body = "");
|
|
|
|
nlohmann::ordered_json getRequest(std::string url, std::vector<std::string> headers = {}, std::string body = "");
|
|
|
|
|
|
|
|
}
|