Do bulk replace of stl types.
This commit is contained in:
parent
521486be62
commit
c25a56ee19
531 changed files with 2274 additions and 2181 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
HttpRequest::HttpRequest(Verb verb, const std::string& path)
|
||||
HttpRequest::HttpRequest(Verb verb, const String& path)
|
||||
: mVerb(verb)
|
||||
{
|
||||
mPreamble.mPath = path;
|
||||
|
@ -16,14 +16,14 @@ HttpRequest::Verb HttpRequest::getVerb() const
|
|||
return mVerb;
|
||||
}
|
||||
|
||||
std::string HttpRequest::getPath() const
|
||||
String HttpRequest::getPath() const
|
||||
{
|
||||
return mPreamble.mPath;
|
||||
}
|
||||
|
||||
std::string HttpRequest::toString(const std::string& host) const
|
||||
String HttpRequest::toString(const String& host) const
|
||||
{
|
||||
std::string out;
|
||||
String out;
|
||||
|
||||
if (mVerb == Verb::GET)
|
||||
{
|
||||
|
@ -37,14 +37,14 @@ std::string HttpRequest::toString(const std::string& host) const
|
|||
return out;
|
||||
}
|
||||
|
||||
void HttpRequest::fromString(const std::string& message)
|
||||
void HttpRequest::fromString(const String& message)
|
||||
{
|
||||
std::stringstream ss(message);
|
||||
Stringstream ss(message);
|
||||
|
||||
std::string buffer;
|
||||
String buffer;
|
||||
bool firstLine{ true };
|
||||
|
||||
std::vector<std::string> headers;
|
||||
Vector<String> headers;
|
||||
while (std::getline(ss, buffer, '\n'))
|
||||
{
|
||||
if (firstLine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue