Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OAuth4Tw.cpp
00001 #include "OAuth4Tw.h" 00002 #include "mbed.h" 00003 #include "oauth.h" 00004 00005 OAuth4Tw::OAuth4Tw(const char *c_key, const char *c_secret, 00006 const char *t_key, const char *t_secret) 00007 :consumer_key(c_key), 00008 consumer_secret(c_secret), 00009 token_key(t_key), 00010 token_secret(t_secret) { } 00011 00012 std::string OAuth4Tw::url_escape(const char *str) { 00013 return oauth_url_escape(str); 00014 } 00015 00016 std::string OAuth4Tw::post(const char *uri, std::string postarg) { 00017 00018 std::string req_url; 00019 std::string postres; 00020 00021 req_url = oauth_sign_url2(uri, &postarg, OA_HMAC, 0, 00022 consumer_key, consumer_secret, token_key, token_secret); 00023 printf("req_url2:%s\n", req_url.c_str()); 00024 00025 postres = oauth_http_post(req_url.c_str(), postarg.c_str()); 00026 return postres; 00027 } 00028
Generated on Wed Jul 20 2022 04:19:30 by
1.7.2