Fixed compatibility for HTTPClient Library. (HTTPClient by Donatien Garnier)

Dependents:   FlashAir_Twitter CyaSSL-Twitter-OAuth4Tw TweetTest NetworkThermometer ... more

Fork of OAuth4Tw by Masayoshi Takahashi

Revision:
4:1ecf49a46040
Parent:
3:c28b796ef7ed
Child:
5:5146becb651f
diff -r c28b796ef7ed -r 1ecf49a46040 OAuth4Tw.h
--- a/OAuth4Tw.h	Wed Jul 08 03:52:54 2015 +0000
+++ b/OAuth4Tw.h	Wed Jul 08 14:32:26 2015 +0000
@@ -2,17 +2,21 @@
 #define MBED_OAUTH4TW_H
 
 #include "mbed.h"
+#include "HTTPClient.h"
 #include <string>
 
-class OAuth4Tw {
+class OAuth4Tw
+{
 public:
     OAuth4Tw(const char *c_key, const char *c_secret,
-        const char *t_key, const char *t_secret);
-        
+             const char *t_key, const char *t_secret);
+
     static std::string url_escape(const char *str);
-    
-    std::string post(const char *uri, std::string postarg);
-    
+
+    HTTPResult get(const char *uri, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT);
+
+    HTTPResult post(const char *uri, std::string postargs, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT);
+
 private:
     const char *consumer_key;
     const char *consumer_secret;