1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-25 02:52:05 +00:00
AIO-switch-updater/include/download.hpp

13 lines
645 B
C++
Raw Normal View History

2020-09-20 01:21:28 +01:00
#pragma once
#define ON 1
#define OFF 0
#include "json.hpp"
2020-09-20 01:21:28 +01:00
std::vector<std::uint8_t> downloadFile(const char *url, const char *output = "", int api = OFF);
2021-02-08 20:30:58 +00:00
std::vector<std::pair<std::string, std::string>> getLinks(const char *url);
2020-09-20 01:21:28 +01:00
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 = "");
2021-02-26 18:21:49 +00:00
nlohmann::ordered_json getRequest(std::string url, std::vector<std::string> headers = {}, std::string body = "");