summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/utility.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-29 17:27:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-29 17:27:23 +0000
commitcdd84a443d08a4f5748b52b102ce17dfd267acc5 (patch)
treee2899cfeaa8f8127dd3674ec43a66f152b146b2b /protocols/Twitter/src/utility.cpp
parent57cc565a85d08a1fefb0035374f9e4d061500723 (diff)
twitter moved to the kernel json driver
git-svn-id: http://svn.miranda-ng.org/main/trunk@13248 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/utility.cpp')
-rw-r--r--protocols/Twitter/src/utility.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp
index 46e3c07d60..dcdda75a9e 100644
--- a/protocols/Twitter/src/utility.cpp
+++ b/protocols/Twitter/src/utility.cpp
@@ -26,6 +26,20 @@ std::string b64encode(const std::string &s)
return std::string(ptrA(mir_base64_encode((BYTE*)s.c_str(), (unsigned)s.length())));
}
+std::string int2str(int32_t iVal)
+{
+ char buf[100];
+ _itoa_s(iVal, buf, 10);
+ return std::string(buf);
+}
+
+std::string int2str(uint64_t iVal)
+{
+ char buf[100];
+ _i64toa_s(iVal, buf, _countof(buf), 10);
+ return std::string(buf);
+}
+
http::response mir_twitter::slurp(const std::string &url, http::method meth, OAuthParameters postParams)
{
NETLIBHTTPREQUEST req = { sizeof(req) };