fork of HTTPClient, adding custom content type for HTTPText (for now)

Fork of HTTPClient by wolf SSL

Revision:
34:09abfb894400
Parent:
16:1f743885e7de
--- a/data/HTTPText.h	Tue Jul 21 01:07:25 2015 +0000
+++ b/data/HTTPText.h	Mon Sep 28 08:54:27 2015 +0000
@@ -21,6 +21,7 @@
 #ifndef HTTPTEXT_H_
 #define HTTPTEXT_H_
 
+#include <string>
 #include "../IHTTPData.h"
 
 /** A data endpoint to store text
@@ -38,6 +39,8 @@
    * @param size Size of the buffer
    */
   HTTPText(char* str, size_t size);
+  
+  virtual void setDataType(const char* type); //Internet media type from Content-Type header
 
 protected:
   //IHTTPDataIn
@@ -56,8 +59,6 @@
   
   virtual int write(const char* buf, size_t len);
 
-  virtual void setDataType(const char* type); //Internet media type from Content-Type header
-
   virtual void setIsChunked(bool chunked); //From Transfer-Encoding header
 
   virtual void setDataLen(size_t len); //From Content-Length header, or if the transfer is chunked, next chunk length
@@ -67,6 +68,7 @@
   size_t m_size;
 
   size_t m_pos;
+  std::string m_datatype;
 };
 
 #endif /* HTTPTEXT_H_ */