summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/utility.cpp
diff options
context:
space:
mode:
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) };