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.
HTTPHeader.cpp
- Committer:
- feb11
- Date:
- 2013-09-16
- Revision:
- 0:1abc65a0f50b
File content as of revision 0:1abc65a0f50b:
#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; }