Files
boost_beast/doc/4_00_http.qbk
T

85 lines
2.6 KiB
Plaintext
Raw Normal View History

2017-05-28 19:49:41 -07:00
[/
Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
]
[section:http Using HTTP]
2017-06-02 19:12:39 -07:00
This library offers programmers simple and performant models of HTTP messages
and their associated operations including synchronous, asynchronous, and
buffer-oriented parsing and serialization of messages in the HTTP/1 wire
2017-05-28 19:49:41 -07:00
format using __Asio__. Specifically, the library provides:
[variablelist
[
[Message Containers]
[
Complete HTTP messages are modeled using the __message__ class,
with possible user customizations.
]
][
[Stream Reading]
[
The functions
[link beast.ref.http__read `read`],
2017-06-02 19:12:39 -07:00
[link beast.ref.http__read_header `read_header`],
2017-05-28 19:49:41 -07:00
[link beast.ref.http__read_some `read_some`],
2017-06-02 19:12:39 -07:00
[link beast.ref.http__async_read `async_read`],
[link beast.ref.http__async_read_header `async_read_header`], and
2017-05-28 19:49:41 -07:00
[link beast.ref.http__async_read_some `async_read_some`]
2017-06-02 19:12:39 -07:00
read HTTP/1 message data from a
2017-06-04 17:25:55 -07:00
[link beast.concept.streams stream].
2017-05-28 19:49:41 -07:00
]
][
[Stream Writing]
[
The functions
[link beast.ref.http__write `write`],
2017-06-02 19:12:39 -07:00
[link beast.ref.http__write_header `write_header`],
2017-05-28 19:49:41 -07:00
[link beast.ref.http__write_some `write_some`],
2017-06-02 19:12:39 -07:00
[link beast.ref.http__async_write `async_write`],
[link beast.ref.http__async_write_header `async_write_header`], and
2017-05-28 19:49:41 -07:00
[link beast.ref.http__async_write_some `async_write_some`]
2017-06-02 19:12:39 -07:00
write HTTP/1 message data to a
2017-06-04 17:25:55 -07:00
[link beast.concept.streams stream].
2017-05-28 19:49:41 -07:00
]
][
[Serialization]
[
The __serializer__ produces a series of octet buffers
conforming to the __rfc7230__ wire representation of
a __message__.
]
][
[Parsing]
[
2017-06-03 08:56:21 -07:00
The __parser__ attempts to convert a series of octet
buffers into a __message__.
2017-05-28 19:49:41 -07:00
]
]
]
[note
2017-06-04 17:25:55 -07:00
This documentation assumes some familiarity with __Asio__ and
the HTTP protocol specification described in __rfc7230__. Sample
code and identifiers mentioned in this section is written as if
these declarations are in effect:
2017-05-28 19:49:41 -07:00
```
#include <beast/http.hpp>
using namespace beast::http;
```
]
2017-06-04 17:25:55 -07:00
[include 4_01_primer.qbk]
[include 4_02_message.qbk]
[include 4_03_streams.qbk]
[include 4_04_serializer_streams.qbk]
[include 4_05_parser_streams.qbk]
[include 4_06_serializer_buffers.qbk]
[include 4_07_parser_buffers.qbk]
[include 4_08_custom_parsers.qbk]
[include 4_09_custom_body.qbk]
2017-05-28 19:49:41 -07:00
[endsect]