diff options
Diffstat (limited to 'protocols/Steam/src/api/session.h')
-rw-r--r-- | protocols/Steam/src/api/session.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/Steam/src/api/session.h b/protocols/Steam/src/api/session.h index b00e470da6..d4e91721cb 100644 --- a/protocols/Steam/src/api/session.h +++ b/protocols/Steam/src/api/session.h @@ -5,19 +5,21 @@ class GetSessionRequest : public HttpRequest {
public:
GetSessionRequest(const char *token, const char *steamId, const char *cookie) :
- HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobileloginsucceeded")
+ HttpRequest(HttpPost, STEAM_WEB_URL "/mobileloginsucceeded")
{
flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
+ Content = new FormUrlEncodedContent(this)
+ << CHAR_PARAM("oauth_token", token)
+ << CHAR_PARAM("steamid", steamId)
+ << CHAR_PARAM("webcookie", cookie);
+
char data[512];
mir_snprintf(data, _countof(data),
"oauth_token=%s&steamid=%s&webcookie=%s",
token,
steamId,
cookie);
-
- SetData(data, strlen(data));
- AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
}
};
@@ -25,7 +27,7 @@ class GetSessionRequest2 : public HttpRequest {
public:
GetSessionRequest2() :
- HttpRequest(REQUEST_GET, STEAM_WEB_URL)
+ HttpRequest(HttpGet, STEAM_WEB_URL)
{
flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
}
|