Beast Logo

PrevUpHomeNext

http::header_parser_v1

A parser for a HTTP/1 request or response header.

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

Name

Description

header_type

The type of the header 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 header.

header_parser_v1

Default constructor.

Move constructor.

Copy constructor (disallowed)

Construct the parser.

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)

release

Returns ownership of the parsed header.

set_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 HTTP/1 wire format parser to convert a series of octets into a request or response http::header.

Remarks

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

Requirements

Header: beast/http/header_parser_v1.hpp

Convenience header: beast/http.hpp


PrevUpHomeNext