Don't use a hard-coded user-agent for placefiles, add DPI parameter

This commit is contained in:
Dan Paulat 2023-07-28 22:33:39 -05:00
parent 751cafbfe7
commit e3449e382d
5 changed files with 58 additions and 6 deletions

View file

@ -0,0 +1,26 @@
#include <scwx/network/cpr.hpp>
namespace scwx
{
namespace network
{
namespace cpr
{
static const std::string logPrefix_ = "scwx::network::cpr";
static ::cpr::Header header_ {};
::cpr::Header GetHeader()
{
return header_;
}
void SetUserAgent(const std::string& userAgent)
{
header_.insert_or_assign("User-Agent", userAgent);
}
} // namespace cpr
} // namespace network
} // namespace scwx