![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
GDP group 24 node core
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue
http.h@1:27b35752c5d0, 2014-11-18 (annotated)
- Committer:
- Trumple
- Date:
- Tue Nov 18 18:28:52 2014 +0000
- Revision:
- 1:27b35752c5d0
- Child:
- 2:1cbb20dd1733
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Trumple | 1:27b35752c5d0 | 1 | #include "mbed.h" |
Trumple | 1:27b35752c5d0 | 2 | #include "EthernetInterface.h" |
Trumple | 1:27b35752c5d0 | 3 | #include <string> |
Trumple | 1:27b35752c5d0 | 4 | |
Trumple | 1:27b35752c5d0 | 5 | #define DEBUG |
Trumple | 1:27b35752c5d0 | 6 | |
Trumple | 1:27b35752c5d0 | 7 | class http |
Trumple | 1:27b35752c5d0 | 8 | { |
Trumple | 1:27b35752c5d0 | 9 | public: |
Trumple | 1:27b35752c5d0 | 10 | string get(string address, int port, string url, int replyTimeout = 20); |
Trumple | 1:27b35752c5d0 | 11 | string post(string address, int port, string url, string jsonPayload, int replyTimeout = 20); |
Trumple | 1:27b35752c5d0 | 12 | string parse(string httpReply); |
Trumple | 1:27b35752c5d0 | 13 | |
Trumple | 1:27b35752c5d0 | 14 | http(); |
Trumple | 1:27b35752c5d0 | 15 | |
Trumple | 1:27b35752c5d0 | 16 | private: |
Trumple | 1:27b35752c5d0 | 17 | EthernetInterface eth; |
Trumple | 1:27b35752c5d0 | 18 | string receiveFromSock(TCPSocketConnection sock, int replyTimeout); |
Trumple | 1:27b35752c5d0 | 19 | }; |