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.

Committer:
feb11
Date:
Wed Sep 04 13:24:29 2013 +0000
Revision:
0:ab9011f6ede5
Child:
2:6d7bc51cc77b
initial import

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feb11 0:ab9011f6ede5 1 #ifndef HTTP_HEADER_H
feb11 0:ab9011f6ede5 2 #define HTTP_HEADER_H
feb11 0:ab9011f6ede5 3
feb11 0:ab9011f6ede5 4 #include <string>
feb11 0:ab9011f6ede5 5 #include "HTTPStatus.h"
feb11 0:ab9011f6ede5 6
feb11 0:ab9011f6ede5 7 class HTTPSClient;
feb11 0:ab9011f6ede5 8
feb11 0:ab9011f6ede5 9 class HTTPHeader
feb11 0:ab9011f6ede5 10 {
feb11 0:ab9011f6ede5 11 public :
feb11 0:ab9011f6ede5 12
feb11 0:ab9011f6ede5 13 friend class HTTPSClient;
feb11 0:ab9011f6ede5 14
feb11 0:ab9011f6ede5 15 HTTPHeader(HTTPStatus status = HTTP_INVALID);
feb11 0:ab9011f6ede5 16
feb11 0:ab9011f6ede5 17 static std::string getRequest(const std::string &path, const std::string &host, const int port);
feb11 0:ab9011f6ede5 18
feb11 0:ab9011f6ede5 19 HTTPStatus getStatus() const;
feb11 0:ab9011f6ede5 20 int getBodyLength() const;
feb11 0:ab9011f6ede5 21 private :
feb11 0:ab9011f6ede5 22
feb11 0:ab9011f6ede5 23 HTTPStatus _status;
feb11 0:ab9011f6ede5 24 int _bodyLength;
feb11 0:ab9011f6ede5 25 };
feb11 0:ab9011f6ede5 26
feb11 0:ab9011f6ede5 27 #endif
feb11 0:ab9011f6ede5 28