forked from boostorg/beast
Refactor HTTP identifier names (API Change):
fix #171 Several names and HTTP identifiers are renamed to be more consistent, self-explanatory, and concise: * "Fields" is a collection of HTTP header fields (rfc7230 section 3.2) * "Header" is the Start Line plus Fields. Another way to look at it is, the HTTP message minus the body. * `basic_fields` replaces `basic_headers` * `fields` replaces `headers` * `Fields` replaces `Headers` in template parameter lists * `header` replaces `message_headers` * `header::fields` replaces `message_headers::fields` The changes are cosmetic and do not affect run-time behavior.
This commit is contained in:
@@ -40,9 +40,9 @@ int main(int, char const*[])
|
||||
req.method = "GET";
|
||||
req.url = "/";
|
||||
req.version = 11;
|
||||
req.headers.insert("Host", host + std::string(":") +
|
||||
req.fields.insert("Host", host + std::string(":") +
|
||||
boost::lexical_cast<std::string>(ep.port()));
|
||||
req.headers.insert("User-Agent", "beast/http");
|
||||
req.fields.insert("User-Agent", "beast/http");
|
||||
prepare(req);
|
||||
write(sock, req);
|
||||
response<string_body> res;
|
||||
|
||||
Reference in New Issue
Block a user