A wrapper class for talking to Axeda from MBED devices. Uses HTTPClient and MbedJSONValue classes.

Dependents:   axeda_wrapper_dev MTS_Axeda_Example

AxedaWrapper simplifies pushing data to Axeda's cloud.

Uses HTTPClient and MbedJSONValue libs:

http://mbed.org/users/donatien/code/HTTPClient/

http://mbed.org/users/samux/code/MbedJSONValue/

HTTPJsonText.h

Committer:
mfiore
Date:
2013-12-20
Revision:
1:d42aaf6f2e19

File content as of revision 1:d42aaf6f2e19:

#ifndef HTTPJSONTEXT_H_
#define HTTPJSONTEXT_H_

#include "HTTPText.h"

 /** A data endpoint to store text
*/
class HTTPJsonText: public HTTPText
{
public:
    HTTPJsonText(char* arg);
    
protected:
    virtual int getDataType(char* type, size_t maxTypeLen); //Internet media type for Content-Type header
};

HTTPJsonText::HTTPJsonText(char* arg) : HTTPText(arg) {}

/*virtual*/ int HTTPJsonText::getDataType(char* type, size_t maxTypeLen) //Internet media type for Content-Type header
{
    strncpy(type, "application/json", maxTypeLen-1);
    type[maxTypeLen-1] = '\0';
    return 0;
}

#endif /* HTTPJSONTEXT_H_ */