blob: a196f35f1c6681581bbc7e42d5607dfbcbc10262 (
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
|
#ifndef _STEAM_REQUEST_POLL_H_
#define _STEAM_REQUEST_POLL_H_
class PollRequest : public HttpRequest
{
public:
PollRequest(const char *token, const char *umqId, UINT32 messageId, int idleSeconds) :
HttpRequest(REQUEST_POST, STEAM_API_URL "/ISteamWebUserPresenceOAuth/Poll/v0001")
{
timeout = (STEAM_API_TIMEOUT + 5) * 1000;
flags |= NLHRF_PERSISTENT;
CMStringA data;
data.AppendFormat("access_token=%s&umqid=%s&message=%u&secidletime=%d§imeout=%d",
token,
umqId,
messageId,
idleSeconds,
STEAM_API_TIMEOUT);
SetData(data, data.GetLength());
AddHeader("Connection", "keep-alive");
AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
}
};
#endif //_STEAM_REQUEST_POLL_H_
|