GDP group 24 node core

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue

http.h

Committer:
Trumple
Date:
2014-11-18
Revision:
1:27b35752c5d0
Child:
2:1cbb20dd1733

File content as of revision 1:27b35752c5d0:

#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);
        
        http();
    
    private:
        EthernetInterface eth;
        string receiveFromSock(TCPSocketConnection sock, int replyTimeout);
};