Fixed compatibility for HTTPClient Library. (HTTPClient by Donatien Garnier)
Dependents: FlashAir_Twitter CyaSSL-Twitter-OAuth4Tw TweetTest NetworkThermometer ... more
Fork of OAuth4Tw by
OAuth4Tw.h@4:1ecf49a46040, 2015-07-08 (annotated)
- Committer:
- ban4jp
- Date:
- Wed Jul 08 14:32:26 2015 +0000
- Revision:
- 4:1ecf49a46040
- Parent:
- 3:c28b796ef7ed
- Child:
- 5:5146becb651f
Add GET method, and changed the API.
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 | 3:c28b796ef7ed | 6 | #include <string> |
takahashim | 0:0048b264a3ad | 7 | |
ban4jp | 4:1ecf49a46040 | 8 | class OAuth4Tw |
ban4jp | 4:1ecf49a46040 | 9 | { |
takahashim | 0:0048b264a3ad | 10 | public: |
takahashim | 0:0048b264a3ad | 11 | OAuth4Tw(const char *c_key, const char *c_secret, |
ban4jp | 4:1ecf49a46040 | 12 | const char *t_key, const char *t_secret); |
ban4jp | 4:1ecf49a46040 | 13 | |
takahashim | 0:0048b264a3ad | 14 | static std::string url_escape(const char *str); |
ban4jp | 4:1ecf49a46040 | 15 | |
ban4jp | 4:1ecf49a46040 | 16 | HTTPResult get(const char *uri, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); |
ban4jp | 4:1ecf49a46040 | 17 | |
ban4jp | 4:1ecf49a46040 | 18 | HTTPResult post(const char *uri, std::string postargs, IHTTPDataIn* response, int timeout = HTTP_CLIENT_DEFAULT_TIMEOUT); |
ban4jp | 4:1ecf49a46040 | 19 | |
takahashim | 0:0048b264a3ad | 20 | private: |
takahashim | 0:0048b264a3ad | 21 | const char *consumer_key; |
takahashim | 0:0048b264a3ad | 22 | const char *consumer_secret; |
takahashim | 0:0048b264a3ad | 23 | const char *token_key; |
takahashim | 0:0048b264a3ad | 24 | const char *token_secret; |
takahashim | 0:0048b264a3ad | 25 | }; |
takahashim | 0:0048b264a3ad | 26 | |
takahashim | 0:0048b264a3ad | 27 | #endif |