Define and use a proper HTTP header structure

This commit is contained in:
Chocobo1 2020-05-10 02:48:21 +08:00
parent 957d697aee
commit 74a2168bc1
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
5 changed files with 16 additions and 17 deletions

View file

@ -35,9 +35,9 @@ void ResponseBuilder::status(const uint code, const QString &text)
m_response.status = {code, text};
}
void ResponseBuilder::header(const QString &name, const QString &value)
void ResponseBuilder::header(const Header &header)
{
m_response.headers[name] = value;
m_response.headers[header.name] = header.value;
}
void ResponseBuilder::print(const QString &text, const QString &type)