Beast Logo

PrevUpHomeNext

http::prepare

Prepare a HTTP message.

template<
    bool isRequest,
    class Body,
    class Fields,
    class... Options>
void
prepare(
    message< isRequest, Body, Fields >& msg,
    Options&&... options);

This function will adjust the Content-Length, Transfer-Encoding, and Connection fields of the message based on the properties of the body and the options passed in.

Parameters

msg

The message to prepare. The fields may be modified.

options

A list of prepare options.

Requirements

Header: beast/http/message.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext