Small wrapper of TLS_cyassl

Dependents:   HTTPSClientExample2

This is a small wrapper of TLS_cyassl to easily sends GET requests over HTTPS. This library is used in the same way as HTTPSClient_axTLS.

Import programHTTPSClientExample2

This example shows how to use the TLS_cyassl library. It connects to twitter.com and downloads a webpage.

Revision:
0:1abc65a0f50b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPHeader.cpp	Mon Sep 16 10:39:01 2013 +0000
@@ -0,0 +1,31 @@
+#include "HTTPHeader.h"
+
+HTTPHeader::HTTPHeader(HTTPStatus status):
+    _status(status),
+    _bodyLength(0)
+{
+}
+
+std::string HTTPHeader::getRequest(const std::string &path, const std::string &host, const int port)
+{
+    
+    std::string request = "GET ";
+    request += path;
+    request += " HTTP/1.0\r\nHost: ";
+    request += host;
+    request += ":";
+    request += port;
+    request += "\r\n\r\n";
+    return request;
+}
+
+HTTPStatus HTTPHeader::getStatus() const
+{
+    return _status;
+}
+
+int HTTPHeader::getBodyLength() const
+{
+    return _bodyLength;
+}
+