mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:00:04 +00:00
Don't use a hard-coded user-agent for placefiles, add DPI parameter
This commit is contained in:
parent
751cafbfe7
commit
e3449e382d
5 changed files with 58 additions and 6 deletions
26
wxdata/source/scwx/network/cpr.cpp
Normal file
26
wxdata/source/scwx/network/cpr.cpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue