wrapper of TLS library to connect to HTTPS servers
Dependents: HTTPSClientExample
This library provides a simple interface to send GET requests over HTTPS. Notice that this library uses the axTLS library for the implementation of TLS.
Import programHTTPSClientExample
Connect to twitter.com and copies this webpage to a file.
HTTPHeader.cpp
- Committer:
- feb11
- Date:
- 2013-09-05
- Revision:
- 2:6d7bc51cc77b
- Parent:
- 0:ab9011f6ede5
- Child:
- 3:18af58231990
File content as of revision 2:6d7bc51cc77b:
#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.1\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; }