Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HTTPSClientExample
HTTPHeader.cpp
- Committer:
- feb11
- Date:
- 2013-09-12
- Revision:
- 3:18af58231990
- Parent:
- 2:6d7bc51cc77b
File content as of revision 3:18af58231990:
#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;
}