mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-12-01 05:42:02 +00:00
17 lines
No EOL
742 B
C++
17 lines
No EOL
742 B
C++
#pragma once
|
|
|
|
constexpr int ON = 1;
|
|
constexpr int OFF = 0;
|
|
|
|
#include <json.hpp>
|
|
|
|
namespace download {
|
|
|
|
std::vector<std::uint8_t> downloadFile(const std::string& url, const char* output = "", int api = OFF);
|
|
std::vector<std::pair<std::string, std::string>> getLinks(const std::string& url);
|
|
std::string fetchTitle(const std::string& url);
|
|
std::string downloadPage(const std::string& url, std::vector<std::string> headers = {}, std::string body = "");
|
|
std::vector<std::uint8_t> downloadPageBinary(const std::string& url, std::vector<std::string> headers = {}, std::string body = "");
|
|
nlohmann::ordered_json getRequest(const std::string& url, std::vector<std::string> headers = {}, std::string body = "");
|
|
|
|
} |