Beast Logo

PrevUpHomeNext

http::parser_v1

A parser for producing HTTP/1 messages.

template<
    bool isRequest,
    class Body,
    class Fields>
class parser_v1 :
    public http::basic_parser_v1< isRequest, parser_v1< isRequest, Body, Fields > >,
    std::conditional::type< isRequest, detail::request_parser_base, detail::response_parser_base >
Types

Name

Description

message_type

The type of message this parser produces.

Member Functions

Name

Description

complete

Returns true if the parse has completed succesfully.

flags

Returns internal flags associated with the parser.

get

Returns the parsed message.

http_major

Returns the major HTTP version number.

http_minor

Returns the minor HTTP version number.

keep_alive

Returns true if the connection should be kept open.

needs_eof

Returns true if the message end is indicated by eof.

operator=

Move assignment (disallowed)

Copy assignment (disallowed)

parser_v1

Default constructor.

Move constructor.

Copy constructor (disallowed)

Construct the parser.

Construct the parser from a fields parser.

release

Returns ownership of the parsed message.

set_option

Set the skip body option.

Set options on the parser.

Set the header maximum size option.

Set the body maximum size option.

status_code

Returns the numeric HTTP Status-Code of a response.

upgrade

Returns true if the message is an upgrade message.

write

Write a sequence of buffers to the parser.

Write a single buffer of data to the parser.

write_eof

Called to indicate the end of file.

Protected Member Functions

Name

Description

reset

Reset the parsing state.

This class uses the basic HTTP/1 wire format parser to convert a series of octets into a message.

Remarks

A new instance of the parser is required for each message.

Requirements

Header: beast/http/parser_v1.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext