diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-03-22 20:23:42 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-03-22 20:23:42 +0000 |
commit | a9edb12c2cc13a74f16c0a61deaeaa8780f13f4e (patch) | |
tree | 70e805ba7e7f7024d31d91971655a4405cb25f92 /protocols/SkypeWeb/src/requests/contacts.h | |
parent | 4ba63fe41c45077e90e24f77bcece6af9ddeafef (diff) |
SkypeWeb: refactored HttpRequest
git-svn-id: http://svn.miranda-ng.org/main/trunk@12477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests/contacts.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/contacts.h | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/protocols/SkypeWeb/src/requests/contacts.h b/protocols/SkypeWeb/src/requests/contacts.h index 5e4ce2cffe..aff095df65 100644 --- a/protocols/SkypeWeb/src/requests/contacts.h +++ b/protocols/SkypeWeb/src/requests/contacts.h @@ -9,8 +9,12 @@ public: {
flags |= NLHRF_SSL;
- AddHeader("X-Skypetoken", token);
- AddHeader("Accept", "application/json");
+ Url << CHAR_VALUE("hideDetails", "true");
+
+ Headers
+ << CHAR_VALUE("X-Skypetoken", "Accept")
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
}
};
@@ -22,18 +26,15 @@ public: {
flags |= NLHRF_SSL;
- CMStringA data;
+ Headers
+ << CHAR_VALUE("X-Skypetoken", "Accept")
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
+
for (size_t i = 0; i < skypenames.getCount(); i++)
{
- data.AppendFormat("contacts[]=%s&", skypenames[i]);
+ Body << CHAR_VALUE("contacts[]", skypenames[i]);
}
- data.Delete(data.GetLength() - 1);
-
- SetData(data, data.GetLength());
-
- AddHeader("X-Skypetoken", token);
- AddHeader("Accept", "application/json");
- AddHeader("Content-Type", "application/x-www-form-urlencoded");
}
};
@@ -45,8 +46,9 @@ public: {
flags |= NLHRF_SSL;
- AddHeader("X-Skypetoken", token);
- AddHeader("Accept", "application/json");
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
}
};
@@ -58,8 +60,9 @@ public: {
flags |= NLHRF_SSL;
- AddHeader("X-Skypetoken", token);
- AddHeader("Accept", "application/json");
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
}
};
@@ -71,8 +74,9 @@ public: {
flags |= NLHRF_SSL;
- AddHeader("X-Skypetoken", token);
- AddHeader("Accept", "application/json");
+ Headers
+ << CHAR_VALUE("X-Skypetoken", token)
+ << CHAR_VALUE("Accept", "application/json");
}
};
|