diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-03 05:33:18 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-03 05:33:18 +0000 |
commit | a50ae784ce7394b2621cf42a28cab7edd31e6c6a (patch) | |
tree | d32d2925947e77442d364c1849adfd54bb896276 /protocols/SkypeWeb/src/requests/status.h | |
parent | 2e511ab1b1ff3d78c695874e3b28ff4ce7680cc8 (diff) |
login fix and some other fixes (patch by MikalaiR)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12581 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/status.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/status.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/requests/status.h b/protocols/SkypeWeb/src/requests/status.h index 1fc30bac81..a8bbdc82f0 100644 --- a/protocols/SkypeWeb/src/requests/status.h +++ b/protocols/SkypeWeb/src/requests/status.h @@ -4,10 +4,12 @@ class SetStatusRequest : public HttpRequest
{
public:
- SetStatusRequest(const char *regToken, const char *status) :
- HttpRequest(REQUEST_PUT, "client-s.gateway.messenger.live.com/v1/users/ME/presenceDocs/messagingService")
+ SetStatusRequest(const char *regToken, const char *status, const char *server = "client-s.gateway.messenger.live.com") :
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/presenceDocs/messagingService", server)
{
CMStringA auth = "registrationToken=";
+ CMStringA statuss;
+ statuss.AppendFormat("{\"status\":\"%s\"}", status);
auth += regToken;
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
@@ -19,7 +21,7 @@ public: << CHAR_VALUE("Origin", "https://web.skype.com")
<< CHAR_VALUE("Connection", "keep-alive");
- Body << FORMAT_VALUE("{\"status\":\"%s\"}", status);
+ Body << VALUE(statuss);
}
};
|