Skip to content

Commit ad488ef

Browse files
committed
[FOLD]
1 parent b24f2b6 commit ad488ef

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

doc/modules/ROOT/pages/2.messages.adoc

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,32 @@ obs-fold = CRLF 1*( SP / HTAB )
9999
Operations which create or modify fields throw exceptions when the name or
100100
value do not meet the syntactic requirements of the protocol.
101101

102-
NOTE: Individual header fields may have their own additional syntactic
103-
requirements, many of which are not checked by the library. For example,
104-
fields whose values represent dates may have particular requirements.
105-
Consult the relevant specifications document to ensure program correctness.
102+
Here we build an
103+
https://tools.ietf.org/html/rfc7231#section-4.3.1[HTTP GET]
104+
request:
105+
106+
[cols="1a,1a"]
107+
|Code|Serialized Result
108+
109+
|
110+
[source,cpp]
111+
request req( method::get, "/index.htm", version::http_1_1 );
112+
req.append( field::accept, "text/html" );
113+
req.append( "User-Agent", "Boost" );
114+
|
115+
[literal]
116+
GET /index.htm HTTP/1.1\r\n
117+
Accept: text/html\r\n
118+
User-Agent: Boost\r\n
119+
\r\n
120+
121+
|===
122+
123+
NOTE: Field-specific syntax (e.g., for date values) is not fully validated by
124+
this library. It is the application’s responsibility to follow the relevant
125+
specifications to ensure correct behavior.
126+
127+
106128

107129
Although fields can be identified by comparing their names, the library
108130
provides the field enumeration, which defines a large set of constants for

0 commit comments

Comments
 (0)