libnick 2024.12.0
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
web.h File Reference
#include <filesystem>
#include <string>
#include <boost/json.hpp>
#include "curleasy.h"

Go to the source code of this file.

Namespaces

namespace  Nickvision
 
namespace  Nickvision::Network
 
namespace  Nickvision::Network::Web
 

Functions

bool Nickvision::Network::Web::getWebsiteExists (const std::string &url)
 Gets whether or not a url points to a valid website.
 
boost::json::value Nickvision::Network::Web::fetchJson (const std::string &url)
 Fetches a json string from a url.
 
bool Nickvision::Network::Web::downloadFile (const std::string &url, const std::filesystem::path &path, const CurlProgressFunction &progress={}, bool overwrite=true)
 Downloads a file to disk.
 

Detailed Description

Author
Nicholas Logozzo nlogo.nosp@m.zzo2.nosp@m.25@gm.nosp@m.ail..nosp@m.com

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at https://www.gnu.org/copyleft/gpl.html

DESCRIPTION

Functions for working with the web.