Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: axeda_wrapper_dev MTS_Axeda_Example
HTTPJsonText.h
00001 #ifndef HTTPJSONTEXT_H_ 00002 #define HTTPJSONTEXT_H_ 00003 00004 #include "HTTPText.h" 00005 00006 /** A data endpoint to store text 00007 */ 00008 class HTTPJsonText: public HTTPText 00009 { 00010 public: 00011 HTTPJsonText(char* arg); 00012 00013 protected: 00014 virtual int getDataType(char* type, size_t maxTypeLen); //Internet media type for Content-Type header 00015 }; 00016 00017 HTTPJsonText::HTTPJsonText(char* arg) : HTTPText(arg) {} 00018 00019 /*virtual*/ int HTTPJsonText::getDataType(char* type, size_t maxTypeLen) //Internet media type for Content-Type header 00020 { 00021 strncpy(type, "application/json", maxTypeLen-1); 00022 type[maxTypeLen-1] = '\0'; 00023 return 0; 00024 } 00025 00026 #endif /* HTTPJSONTEXT_H_ */
Generated on Thu Jul 14 2022 15:08:08 by
1.7.2