libnick 2025.7.3
A cross-platform base for native Nickvision applications.
|
Functions | |
bool | getWebsiteExists (const std::string &url) |
Gets whether or not a url points to a valid website. | |
boost::json::value | getJson (const std::string &url) |
Makes a GET request for json from a url. | |
bool | downloadFile (const std::string &url, const std::filesystem::path &path, const cpr::ProgressCallback &progress={}, bool overwrite=true) |
Downloads a file to disk. |
bool Nickvision::Network::Web::downloadFile | ( | const std::string & | url, |
const std::filesystem::path & | path, | ||
const cpr::ProgressCallback & | progress = {}, | ||
bool | overwrite = true ) |
Downloads a file to disk.
url | The url of the file to download |
path | The path on disk to save the file |
progress | An optional function to receive progress on the download |
overwrite | Whether or not to overwrite existing files on disk |
boost::json::value Nickvision::Network::Web::getJson | ( | const std::string & | url | ) |
Makes a GET request for json from a url.
url | The url of the json resource |
bool Nickvision::Network::Web::getWebsiteExists | ( | const std::string & | url | ) |
Gets whether or not a url points to a valid website.
url | The url to check |