blob: ced52b065cfd2cff00f49222978e19f4fd5eecd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef _STEAM_REQUEST_LOGIN_H_
#define _STEAM_REQUEST_LOGIN_H_
class LogonRequest : public HttpRequest
{
public:
LogonRequest(const char *token) :
HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logon/v0001")
{
char data[256];
mir_snprintf(data, "access_token=%s&ui_mode=web", token);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
}
};
class LogoffRequest : public HttpRequest
{
public:
LogoffRequest(const char *token, const char *umqId) :
HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Logoff/v0001")
{
char data[256];
mir_snprintf(data, "access_token=%s&umqid=%s", token, umqId);
SetData(data, strlen(data));
AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
}
};
#endif //_STEAM_REQUEST_LOGIN_H_
|