libnick 2025.9.1
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) noexcept;
45 boost::json::value getJson(const std::string& url) noexcept;
53 bool downloadFile(const std::string& url, const std::filesystem::path& path, const cpr::ProgressCallback& progress = {}, bool overwrite = true) noexcept;
54}
55
56#endif //WEB_H
Definition web.h:32
bool getWebsiteExists(const std::string &url) noexcept
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) noexcept
Downloads a file to disk.
boost::json::value getJson(const std::string &url) noexcept
Makes a GET request for json from a url.