summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/requests/endpoint.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-03 05:33:18 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-03 05:33:18 +0000
commita50ae784ce7394b2621cf42a28cab7edd31e6c6a (patch)
treed32d2925947e77442d364c1849adfd54bb896276 /protocols/SkypeWeb/src/requests/endpoint.h
parent2e511ab1b1ff3d78c695874e3b28ff4ce7680cc8 (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/endpoint.h')
-rw-r--r--protocols/SkypeWeb/src/requests/endpoint.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h
index f6dd9c604c..a5d05b7ec7 100644
--- a/protocols/SkypeWeb/src/requests/endpoint.h
+++ b/protocols/SkypeWeb/src/requests/endpoint.h
@@ -4,8 +4,8 @@
class GetEndpointRequest : public HttpRequest
{
public:
- GetEndpointRequest(const char *regToken, const char *endpointID) :
- HttpRequest(REQUEST_PUT, FORMAT, "client-s.gateway.messenger.live.com/v1/users/ME/endpoints/%s/presenceDocs/messagingService", ptrA(mir_urlEncode(endpointID)))
+ GetEndpointRequest(const char *regToken, const char *endpointID, const char *server = "client-s.gateway.messenger.live.com") :
+ HttpRequest(REQUEST_PUT, FORMAT, "%s/v1/users/ME/endpoints/%s/presenceDocs/messagingService", server, ptrA(mir_urlEncode(endpointID)))
{
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
@@ -16,9 +16,10 @@ public:
<< CHAR_VALUE("Referer", "https://web.skype.com/main")
<< CHAR_VALUE("Origin", "https://web.skype.com")
<< CHAR_VALUE("Connection", "keep-alive");
-
+ CMStringA data;
+ data.AppendFormat ("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"typ\":125,\"skypeNameVersion\":\"0/%s//\",\"nodeInfo\":\"xx\",\"version\":\"0/%s\"}}", MIRANDA_VERSION_STRING, MIRANDA_VERSION_STRING);
Body <<
- VALUE("{\"id\":\"messagingService\",\"type\":\"EndpointPresenceDoc\",\"selfLink\":\"uri\",\"privateInfo\":{\"epname\":\"Miranda\"},\"publicInfo\":{\"capabilities\":\"\",\"type\":1,\"skypeNameVersion\":\"0/0.95.4//\",\"nodeInfo\":\"xx\",\"version\":\"0/0.95.4\"}}");
+ VALUE(data);
}
};
#endif //_SKYPE_REQUEST_ENDPOINT_H_ \ No newline at end of file