Skip to content

Commit

Permalink
Updated the version reported.
Browse files Browse the repository at this point in the history
  • Loading branch information
keiichi-morisato committed Oct 2, 2024
1 parent 9c36f3a commit 2fa6c28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/restcl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ namespace siddiqsoft
class basic_restclient
{
public:
std::string UserAgent {"siddiqsoft.restcl/0.10.8"};
std::wstring UserAgentW {L"siddiqsoft.restcl/0.10.8"};
std::string UserAgent {"siddiqsoft.restcl/0.10.13"};
std::wstring UserAgentW {L"siddiqsoft.restcl/0.10.13"};

public:
/// @brief Synchronous implementation of the IO
Expand Down
15 changes: 9 additions & 6 deletions src/restcl_winhttp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ namespace siddiqsoft
}};

public:
WinHttpRESTClient(const WinHttpRESTClient&) = delete;
WinHttpRESTClient(const WinHttpRESTClient&) = delete;
WinHttpRESTClient& operator=(const WinHttpRESTClient&) = delete;

/// @brief Move constructor. We have the object hSession which must be transferred to our instance.
Expand All @@ -255,7 +255,8 @@ namespace siddiqsoft

// Enable HTTP/2 protocol
if (!WinHttpSetOption(
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag))) {
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag)))
{
#ifdef _DEBUG
std::cerr << std::format("{} Failed set HTTP/2 flag; err:{}\n", __func__, GetLastError());
#endif
Expand All @@ -274,8 +275,8 @@ namespace siddiqsoft

/// @brief Creates the Windows REST Client with given UserAgent string
/// Sets the HTTP/2 option and the decompression options
/// @param ua User agent string; defaults to `siddiqsoft.restcl_winhttp/0.9.2 (Windows NT; x64)`
WinHttpRESTClient(const std::string& ua = "siddiqsoft.restcl_winhttp/0.9.2 (Windows NT; x64)")
/// @param ua User agent string; defaults to `siddiqsoft.restcl_winhttp/0.10.13 (Windows NT; x64)`
WinHttpRESTClient(const std::string& ua = "siddiqsoft.restcl_winhttp/0.10.13 (Windows NT; x64)")
{
UserAgent = ua;
UserAgentW = ConversionUtils::wideFromAscii(ua);
Expand All @@ -287,7 +288,8 @@ namespace siddiqsoft

// Enable HTTP/2 protocol
if (!WinHttpSetOption(
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag))) {
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag)))
{
#ifdef _DEBUG
std::cerr << std::format("{} Failed set HTTP/2 flag; err:{}\n", __func__, GetLastError());
#endif
Expand Down Expand Up @@ -369,7 +371,8 @@ namespace siddiqsoft

// Enable HTTP/2 protocol
if (!WinHttpSetOption(
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag))) {
hSession, WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, (LPVOID)&enableHTTP2Flag, sizeof(enableHTTP2Flag)))
{
#ifdef _DEBUG
std::cerr << std::format("{} Failed set HTTP/2 flag; err:{}\n", __func__, GetLastError());
#endif
Expand Down

0 comments on commit 2fa6c28

Please sign in to comment.