GDP group 24 node core
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue
http.h@2:1cbb20dd1733, 2014-12-14 (annotated)
- Committer:
- Trumple
- Date:
- Sun Dec 14 22:28:24 2014 +0000
- Revision:
- 2:1cbb20dd1733
- Parent:
- 1:27b35752c5d0
- Child:
- 27:61e67ab47da5
Implement getLocalAddress, fix getNetworkParameters, implement timestamp acquisition, implement HTTP response parsing
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 | 2:1cbb20dd1733 | 13 | void connect(); |
Trumple | 1:27b35752c5d0 | 14 | |
Trumple | 1:27b35752c5d0 | 15 | private: |
Trumple | 1:27b35752c5d0 | 16 | EthernetInterface eth; |
Trumple | 1:27b35752c5d0 | 17 | string receiveFromSock(TCPSocketConnection sock, int replyTimeout); |
Trumple | 1:27b35752c5d0 | 18 | }; |