Rename HttpResponse's payload to body (#245)

* rename payload to body

* Fixed ws cmd line tool to use the renamed body

Co-authored-by: Jay <jasoncarr@Jasons-MacBook-Pro.local>
This commit is contained in:
carr-7
2020-09-13 03:01:37 +01:00
committed by GitHub
parent 128bc0afa9
commit 39c84c7d51
6 changed files with 13 additions and 13 deletions

View File

@ -178,7 +178,7 @@ namespace ix
// Write headers
ss.str("");
ss << "Content-Length: " << response->payload.size() << "\r\n";
ss << "Content-Length: " << response->body.size() << "\r\n";
for (auto&& it : response->headers)
{
ss << it.first << ": " << it.second << "\r\n";
@ -190,6 +190,6 @@ namespace ix
return false;
}
return response->payload.empty() ? true : socket->writeBytes(response->payload, nullptr);
return response->body.empty() ? true : socket->writeBytes(response->body, nullptr);
}
} // namespace ix