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

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

Fork of OAuth4Tw by Masayoshi Takahashi

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers OAuth4Tw.h Source File

OAuth4Tw.h

00001 #ifndef MBED_OAUTH4TW_H
00002 #define MBED_OAUTH4TW_H
00003 
00004 #include "mbed.h"
00005 #include "HTTPClient.h"
00006 #include <vector>
00007 #include <string>
00008 
00009 class OAuth4Tw
00010 {
00011 public:
00012     OAuth4Tw(const char *c_key, const char *c_secret,
00013              const char *t_key, const char *t_secret);
00014 
00015     static std::string url_escape(const char *str);
00016 
00017     HTTPResult get(const char *url, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT);
00018 
00019     HTTPResult post(const char *url, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT);
00020     HTTPResult post(const char *url, std::vector<std::string> *postdata, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT);
00021 
00022 private:
00023     const char *consumer_key;
00024     const char *consumer_secret;
00025     const char *token_key;
00026     const char *token_secret;
00027 };
00028 
00029 #endif