From 0156ed41dceeef48f070adf67f14d4ba4c4f6d61 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 28 Dec 2017 21:21:10 +0300 Subject: Steam: refactoring - reworking http requests - added ability to get game name by appid - another attempt to fix #633 - minor refactoring --- protocols/Steam/src/api/rsa_key.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'protocols/Steam/src/api/rsa_key.h') diff --git a/protocols/Steam/src/api/rsa_key.h b/protocols/Steam/src/api/rsa_key.h index 9f89a70403..27a002b717 100644 --- a/protocols/Steam/src/api/rsa_key.h +++ b/protocols/Steam/src/api/rsa_key.h @@ -5,15 +5,16 @@ class GetRsaKeyRequest : public HttpRequest { public: GetRsaKeyRequest(const char *username) : - HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobilelogin/getrsakey/") + HttpRequest(HttpPost, STEAM_WEB_URL "/mobilelogin/getrsakey/") { flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP; - AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); - CMStringA data; data.AppendFormat("username=%s&donotcache=%lld", ptrA(mir_urlEncode(username)), time(NULL)); - SetData(data, data.GetLength()); + + Content = new FormUrlEncodedContent(this) + << CHAR_PARAM("username", username) + << INT64_PARAM("donotcache", time(NULL)); } }; -- cgit v1.2.3