GDP group 24 node core

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue

http.h

Committer:
Trumple
Date:
2014-12-14
Revision:
2:1cbb20dd1733
Parent:
1:27b35752c5d0
Child:
27:61e67ab47da5

File content as of revision 2:1cbb20dd1733:

#include "mbed.h"
#include "EthernetInterface.h"
#include <string>

#define DEBUG

class http
{
    public:
        string get(string address, int port, string url, int replyTimeout = 20);
        string post(string address, int port, string url, string jsonPayload, int replyTimeout = 20);
        string parse(string httpReply);
        void connect();
    
    private:
        EthernetInterface eth;
        string receiveFromSock(TCPSocketConnection sock, int replyTimeout);
};