Fixed compatibility for HTTPClient Library. (HTTPClient by Donatien Garnier)
Dependents: FlashAir_Twitter CyaSSL-Twitter-OAuth4Tw TweetTest NetworkThermometer ... more
Fork of OAuth4Tw by
OAuth4Tw.h@5:5146becb651f, 2015-07-14 (annotated)
- Committer:
- ban4jp
- Date:
- Tue Jul 14 09:31:13 2015 +0000
- Revision:
- 5:5146becb651f
- Parent:
- 4:1ecf49a46040
Fixed argument of post method.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takahashim | 0:0048b264a3ad | 1 | #ifndef MBED_OAUTH4TW_H |
takahashim | 0:0048b264a3ad | 2 | #define MBED_OAUTH4TW_H |
takahashim | 0:0048b264a3ad | 3 | |
takahashim | 0:0048b264a3ad | 4 | #include "mbed.h" |
ban4jp | 4:1ecf49a46040 | 5 | #include "HTTPClient.h" |
ban4jp | 5:5146becb651f | 6 | #include <vector> |
ban4jp | 3:c28b796ef7ed | 7 | #include <string> |
takahashim | 0:0048b264a3ad | 8 | |
ban4jp | 4:1ecf49a46040 | 9 | class OAuth4Tw |
ban4jp | 4:1ecf49a46040 | 10 | { |
takahashim | 0:0048b264a3ad | 11 | public: |
takahashim | 0:0048b264a3ad | 12 | OAuth4Tw(const char *c_key, const char *c_secret, |
ban4jp | 4:1ecf49a46040 | 13 | const char *t_key, const char *t_secret); |
ban4jp | 4:1ecf49a46040 | 14 | |
takahashim | 0:0048b264a3ad | 15 | static std::string url_escape(const char *str); |
ban4jp | 4:1ecf49a46040 | 16 | |
ban4jp | 5:5146becb651f | 17 | HTTPResult get(const char *url, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); |
ban4jp | 4:1ecf49a46040 | 18 | |
ban4jp | 5:5146becb651f | 19 | HTTPResult post(const char *url, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); |
ban4jp | 5:5146becb651f | 20 | HTTPResult post(const char *url, std::vector<std::string> *postdata, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); |
ban4jp | 4:1ecf49a46040 | 21 | |
takahashim | 0:0048b264a3ad | 22 | private: |
takahashim | 0:0048b264a3ad | 23 | const char *consumer_key; |
takahashim | 0:0048b264a3ad | 24 | const char *consumer_secret; |
takahashim | 0:0048b264a3ad | 25 | const char *token_key; |
takahashim | 0:0048b264a3ad | 26 | const char *token_secret; |
takahashim | 0:0048b264a3ad | 27 | }; |
takahashim | 0:0048b264a3ad | 28 | |
takahashim | 0:0048b264a3ad | 29 | #endif |