Beast Logo

PrevUpHomeNext

http::message

A container for a complete HTTP message.

template<
    bool isRequest,
    class Body,
    class Fields>
struct message :
    public http::header< isRequest, Fields >
Types

Name

Description

base_type

The base class used to hold the header portion of the message.

body_type

The type providing the body traits.

fields_type

The type representing the fields.

Member Functions

Name

Description

base

Returns the header portion of the message.

message

Default constructor.

Move constructor.

Copy constructor.

Construct a message from a header.

Construct a message.

operator=

Move assignment.

Copy assignment.

Static Data Members

Name

Description

is_request

Indicates if the header is a request or response.

Data Members

Name

Description

body

A value representing the body.

fields

The HTTP field values.

method

The Request Method.

reason

The Response Reason-Phrase.

status

The Response Status-Code.

url

The Request URI.

version

The HTTP version.

A message can be a request or response, depending on the isRequest template argument value. Requests and responses have different types; functions may be overloaded based on the type if desired.

The Body template argument type determines the model used to read or write the content body of the message.

isRequest

true if this represents a request, or false if this represents a response. Some class data members are conditionally present depending on this value.

Body

A type meeting the requirements of Body.

Fields

The type of container used to hold the field value pairs.

Requirements

Header: beast/http/message.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext