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

Fork of HTTPClient by wolf SSL

Revision:
17:c73d8e61d391
Parent:
16:1f743885e7de
Child:
18:d89df40b4cf3
--- a/HTTPClient.h	Thu Aug 30 15:38:57 2012 +0000
+++ b/HTTPClient.h	Mon Apr 07 23:30:35 2014 +0000
@@ -24,8 +24,6 @@
 #ifndef HTTP_CLIENT_H
 #define HTTP_CLIENT_H
 
-#include "TCPSocketConnection.h"
-
 #define HTTP_CLIENT_DEFAULT_TIMEOUT 15000
 
 class HTTPData;
@@ -125,6 +123,7 @@
   @return The HTTP response code of the last request
   */
   int getHTTPResponseCode();
+  void setHeader(char *header) ;
   
 private:
   enum HTTP_METH
@@ -139,10 +138,11 @@
   HTTPResult connect(const char* url, HTTP_METH method, IHTTPDataOut* pDataOut, IHTTPDataIn* pDataIn, int timeout); //Execute request
   HTTPResult recv(char* buf, size_t minLen, size_t maxLen, size_t* pReadLen); //0 on success, err code on failure
   HTTPResult send(char* buf, size_t len = 0); //0 on success, err code on failure
+  HTTPResult flush(void); //0 on success, err code on failure
   HTTPResult parseURL(const char* url, char* scheme, size_t maxSchemeLen, char* host, size_t maxHostLen, uint16_t* port, char* path, size_t maxPathLen); //Parse URL
-
+  void cyassl_free(void) ;
+  
   //Parameters
-  TCPSocketConnection m_sock;
   
   int m_timeout;
 
@@ -150,6 +150,12 @@
   const char* m_basicAuthPassword;
   int m_httpResponseCode;
 
+  char * header ;
+  /* for CyaSSL */
+  int      sockfd;
+  uint16_t port;
+  struct CYASSL_CTX* ctx ;
+  struct CYASSL    * ssl ;
 };
 
 //Including data containers here for more convenience