GDP group 24 node core
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue
http.h@31:9cf3f1e5ad68, 2015-01-28 (annotated)
- Committer:
- Trumple
- Date:
- Wed Jan 28 21:19:52 2015 +0000
- Revision:
- 31:9cf3f1e5ad68
- Parent:
- 27:61e67ab47da5
Marge master branch
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 | 27:61e67ab47da5 | 13 | bool isEthernetConnected(); |
Trumple | 2:1cbb20dd1733 | 14 | void connect(); |
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 | }; |