Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
In this code we create an HTTP response with a status code indicating success. This message has a body with a non-zero length. The function [link beast.ref.boost__beast__http__message.prepare_payload `message::prepare_payload`] automatically sets the以下代码创建一个带有成功状态码的 HTTP 响应。该消息包含一个非空的消息体。prepare_payload 函数会根据 body 成员的内容和类型自动设置 Content-Lengthor或 Transfer-Encodingfield depending on the content and type of the `body` member. Use of this function is optional; these fields may also be set explicitly.字段。该函数可调用也可不调用;这些字段也可手动显式设置。