summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/rsa_key.h
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2017-12-28 21:21:10 +0300
committeraunsane <aunsane@gmail.com>2017-12-28 21:21:28 +0300
commit0156ed41dceeef48f070adf67f14d4ba4c4f6d61 (patch)
treed0e1dca4c2c9c3c056ae9cb69dde10ea59316481 /protocols/Steam/src/api/rsa_key.h
parentf0075f2b956969f29acd3bc9289c8a5f78faddad (diff)
Steam: refactoring
- reworking http requests - added ability to get game name by appid - another attempt to fix #633 - minor refactoring
Diffstat (limited to 'protocols/Steam/src/api/rsa_key.h')
-rw-r--r--protocols/Steam/src/api/rsa_key.h9
1 files changed, 5 insertions, 4 deletions
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));
}
};