Beast Logo

PrevUpHomeNext

http::skip_body

Skip body option.

struct skip_body
Member Functions

Name

Description

skip_body

Data Members

Name

Description

value

The options controls whether or not the parser expects to see a HTTP body, regardless of the presence or absence of certain fields such as Content-Length.

Depending on the request, some responses do not carry a body. For example, a 200 response to a CONNECT request from a tunneling proxy. In these cases, callers use the http::skip_body option to inform the parser that no body is expected. The parser will consider the message complete after the header has been received.

Example:

parser_v1<true, empty_body, fields> p;
p.set_option(skip_body{true});
Remarks

Objects of this type are passed to parser_v1::set_option.

Requirements

Header: beast/http/parser_v1.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext