From ab75f8e4a3968c956425844415237a4fa6fcee63 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 26 May 2015 19:15:20 +0000 Subject: Steam: merge new api git-svn-id: http://svn.miranda-ng.org/main/trunk@13850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/api/session.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 protocols/Steam/src/api/session.h (limited to 'protocols/Steam/src/api/session.h') diff --git a/protocols/Steam/src/api/session.h b/protocols/Steam/src/api/session.h new file mode 100644 index 0000000000..3e13a2e418 --- /dev/null +++ b/protocols/Steam/src/api/session.h @@ -0,0 +1,24 @@ +#ifndef _STEAM_REQUEST_SESSION_H_ +#define _STEAM_REQUEST_SESSION_H_ + +class GetSessionRequest : public HttpRequest +{ +public: + GetSessionRequest(const char *token, const char *steamId, const char *cookie) : + HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobileloginsucceeded") + { + flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP; + + char data[512]; + mir_snprintf(data, SIZEOF(data), + "oauth_token=%s&steamid=%s&webcookie=%s", + token, + steamId, + cookie); + + SetData(data, strlen(data)); + AddHeader("Content-Type", "application/x-www-form-urlencoded"); + } +}; + +#endif //_STEAM_REQUEST_SESSION_H_ -- cgit v1.2.3