libnick 2025.7.3
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
web.h
Go to the documentation of this file.
1
22
23#ifndef WEB_H
24#define WEB_H
25
26#include <filesystem>
27#include <string>
28#include <boost/json.hpp>
29#include <cpr/callback.h>
30
32{
38 bool getWebsiteExists(const std::string& url);
45 boost::json::value getJson(const std::string& url);
53 bool downloadFile(const std::string& url, const std::filesystem::path& path, const cpr::ProgressCallback& progress = {}, bool overwrite = true);
54}
55
56#endif //WEB_H
Definition web.h:32
bool getWebsiteExists(const std::string &url)
Gets whether or not a url points to a valid website.
bool downloadFile(const std::string &url, const std::filesystem::path &path, const cpr::ProgressCallback &progress={}, bool overwrite=true)
Downloads a file to disk.
boost::json::value getJson(const std::string &url)
Makes a GET request for json from a url.