Skip to content

Commit 06194a2

Browse files
committed
doc: use auto-resolved xref titles and reference macros
1 parent 615940b commit 06194a2

24 files changed

Lines changed: 182 additions & 314 deletions

doc/modules/ROOT/nav.adoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
* xref:index.adoc[Introduction]
2-
* xref:quick-start.adoc[Quick Start]
2+
* xref:quick-start.adoc[]
33
* Guide
4-
** xref:2.guide/2a.making-requests.adoc[Making Requests]
5-
** xref:2.guide/2b.request-bodies.adoc[Request Bodies]
6-
** xref:2.guide/2c.responses.adoc[Responses]
7-
** xref:2.guide/2d.error-handling.adoc[Error Handling]
8-
** xref:2.guide/2e.headers.adoc[Headers]
9-
** xref:2.guide/2f.query-parameters.adoc[Query Parameters]
10-
** xref:2.guide/2g.authentication.adoc[Authentication]
11-
** xref:2.guide/2h.redirects.adoc[Redirects]
12-
** xref:2.guide/2i.cookies.adoc[Cookies]
13-
** xref:2.guide/2j.timeouts.adoc[Timeouts]
14-
** xref:2.guide/2k.connection-pool.adoc[Connection Pool]
15-
** xref:2.guide/2l.proxies.adoc[Proxies]
16-
** xref:2.guide/2m.compression.adoc[Compression]
17-
** xref:2.guide/2n.extending.adoc[Extending]
4+
** xref:2.guide/2a.making-requests.adoc[]
5+
** xref:2.guide/2b.request-bodies.adoc[]
6+
** xref:2.guide/2c.responses.adoc[]
7+
** xref:2.guide/2d.error-handling.adoc[]
8+
** xref:2.guide/2e.headers.adoc[]
9+
** xref:2.guide/2f.query-parameters.adoc[]
10+
** xref:2.guide/2g.authentication.adoc[]
11+
** xref:2.guide/2h.redirects.adoc[]
12+
** xref:2.guide/2i.cookies.adoc[]
13+
** xref:2.guide/2j.timeouts.adoc[]
14+
** xref:2.guide/2k.connection-pool.adoc[]
15+
** xref:2.guide/2l.proxies.adoc[]
16+
** xref:2.guide/2m.compression.adoc[]
17+
** xref:2.guide/2n.extending.adoc[]
1818
* Examples
19-
** xref:examples/usage.adoc[Usage]
20-
** xref:examples/nlohmann_json.adoc[nlohmann/json]
21-
* xref:testing.adoc[Testing]
19+
** xref:examples/usage.adoc[]
20+
** xref:examples/nlohmann_json.adoc[]
21+
* xref:testing.adoc[]
2222
* xref:reference:boost/burl.adoc[Reference]

doc/modules/ROOT/pages/2.guide/2a.making-requests.adoc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ feature. A chain is finished by one of three terminal calls.
8585

8686
== Finishing: send
8787

88-
cpp:request_builder::send[send()] sends the request and reads the status line
88+
cpp:request_builder::send[send] sends the request and reads the status line
8989
and headers, leaving the body unread. It yields `(error_code, response)`:
9090

9191
[source,cpp]
@@ -135,7 +135,7 @@ xref:2.guide/2d.error-handling.adoc[error handling] section.
135135

136136
== Finishing: build and execute
137137

138-
cpp:request_builder::build[build()] does not send anything. It returns a
138+
cpp:request_builder::build[build] does not send anything. It returns a
139139
cpp:request[] — a plain value holding the method, URL, headers, body, and
140140
per-request options — that can be stored, passed around, and executed later
141141
through cpp:client::execute[]:
@@ -159,9 +159,7 @@ client; it can be executed by whichever client is convenient.
159159

160160
== Next Steps
161161

162-
* xref:2.guide/2b.request-bodies.adoc[Request Bodies] — Attaching a payload
163-
* xref:2.guide/2c.responses.adoc[Responses] — Reading the result
164-
* xref:2.guide/2d.error-handling.adoc[Error Handling] — What the error code
165-
means
166-
* xref:2.guide/2e.headers.adoc[Headers and Query Parameters] — Shaping the
167-
request
162+
* xref:2.guide/2b.request-bodies.adoc[] — Attaching a payload
163+
* xref:2.guide/2c.responses.adoc[] — Reading the result
164+
* xref:2.guide/2d.error-handling.adoc[] — What the error code means
165+
* xref:2.guide/2e.headers.adoc[] — Shaping the request

doc/modules/ROOT/pages/2.guide/2b.request-bodies.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ auto r = co_await client.post("https://example.com/post")
8383
== URL-Encoded Forms
8484

8585
cpp:urlencoded_form[] builds an `application/x-www-form-urlencoded` body from
86-
name and value pairs. Names and values are percent-encoded, with spaces written
86+
name/value pairs. Names and values are percent-encoded, with spaces written
8787
as `+`. cpp:urlencoded_form::append[append] chains:
8888

8989
[source,cpp]
@@ -139,8 +139,6 @@ rather than sending a truncated or mis-framed body.
139139

140140
== Next Steps
141141

142-
* xref:2.guide/2c.responses.adoc[Responses] — Reading the body that comes back
143-
* xref:2.guide/2n.extending.adoc[Extending] — Teaching `body` about your own
144-
types
145-
* xref:2.guide/2e.headers.adoc[Headers and Query Parameters] — Overriding the
146-
`Content-Type`
142+
* xref:2.guide/2c.responses.adoc[] — Reading the body that comes back
143+
* xref:2.guide/2n.extending.adoc[] — Teaching `body` about your own types
144+
* xref:2.guide/2e.headers.adoc[] — Overriding the `Content-Type`

doc/modules/ROOT/pages/2.guide/2c.responses.adoc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ r.raise_for_status(); // throws on 4xx and 5xx
3030
r.version(); // http::version
3131
r.headers(); // const http::fields_base&
3232
r.url(); // urls::url_view, the final URL after redirects
33-
r.content_length(); // optional<uint64_t>, empty for a chunked body
33+
r.content_length(); // std::optional<std::uint64_t>, empty for a chunked body
3434
----
3535

3636
== Reading the Body
@@ -158,11 +158,7 @@ case the connection is simply closed on destruction rather than pooled.
158158

159159
== Next Steps
160160

161-
* xref:2.guide/2d.error-handling.adoc[Error Handling] — What the read can fail
162-
with
163-
* xref:2.guide/2m.compression.adoc[Compression] — Transparent decompression
164-
of the body
165-
* xref:2.guide/2k.connection-pool.adoc[Connection Pool] — Where the connection
166-
goes next
167-
* xref:2.guide/2n.extending.adoc[Extending] — Converting the body to your own
168-
types
161+
* xref:2.guide/2d.error-handling.adoc[] — What the read can fail with
162+
* xref:2.guide/2m.compression.adoc[] — Transparent decompression of the body
163+
* xref:2.guide/2k.connection-pool.adoc[] — Where the connection goes next
164+
* xref:2.guide/2n.extending.adoc[] — Converting the body to your own types

doc/modules/ROOT/pages/2.guide/2d.error-handling.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ the *earliest* failure in this order:
114114

115115
== Next Steps
116116

117-
* xref:2.guide/2c.responses.adoc[Responses] — Reading a body once the status is
118-
known
119-
* xref:2.guide/2j.timeouts.adoc[Timeouts] — A common source of transport
120-
failures
121-
* xref:2.guide/2h.redirects.adoc[Redirects] — Where
117+
* xref:2.guide/2c.responses.adoc[] — Reading a body once the status is known
118+
* xref:2.guide/2j.timeouts.adoc[] — A common source of transport failures
119+
* xref:2.guide/2h.redirects.adoc[] — Where
122120
cpp:error::too_many_redirects[too_many_redirects] comes from

doc/modules/ROOT/pages/2.guide/2e.headers.adoc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ request, or on an individual request.
1414

1515
== Default Headers
1616

17-
cpp:client::headers[client::headers()] is the set of headers sent with every
17+
cpp:client::headers[] is the set of headers sent with every
1818
request. A natural place for things that do not change between requests, such as
1919
a `User-Agent` or an `Accept`:
2020

@@ -77,10 +77,10 @@ known
7777
| The request URL
7878

7979
| `Authorization`
80-
| xref:2.guide/2g.authentication.adoc[Authentication]
80+
| xref:2.guide/2g.authentication.adoc[]
8181

8282
| `Cookie`
83-
| The xref:2.guide/2i.cookies.adoc[cookie jar]
83+
| The cpp:client::cookie_jar[cookie jar]
8484

8585
| `Accept-Encoding`
8686
| The xref:2.guide/2m.compression.adoc[compression] settings, unless you set it
@@ -89,10 +89,7 @@ known
8989

9090
== Next Steps
9191

92-
* xref:2.guide/2f.query-parameters.adoc[Query Parameters] — Adding parameters to
93-
the URL
94-
* xref:2.guide/2g.authentication.adoc[Authentication] — The managed
95-
`Authorization` header
96-
* xref:2.guide/2b.request-bodies.adoc[Request Bodies] — Where `Content-Type`
97-
comes from
98-
* xref:2.guide/2i.cookies.adoc[Cookies] — The managed `Cookie` header
92+
* xref:2.guide/2f.query-parameters.adoc[] — Adding parameters to the URL
93+
* xref:2.guide/2g.authentication.adoc[] — The managed `Authorization` header
94+
* xref:2.guide/2b.request-bodies.adoc[] — Where `Content-Type` comes from
95+
* xref:2.guide/2i.cookies.adoc[] — The managed `Cookie` header

doc/modules/ROOT/pages/2.guide/2f.query-parameters.adoc

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
= Query Parameters
1111

12-
Query parameters are the key-and-value pairs that follow the `?` in a URL. Burl
13-
lets you add them with the builder's cpp:request_builder::query[query] function,
12+
Query parameters are the name/value pairs that follow the `?` in a URL. Burl
13+
lets you add them with the cpp:request_builder::query[] function,
1414
and they can equally be written straight into the URL you pass to the verb
1515
function, the two approaches produce the same request.
1616

1717
== The query Function
1818

19-
cpp:request_builder::query[query] appends a key-and-value pair to the URL's
19+
cpp:request_builder::query[] appends a name/value pair to the URL's
2020
query string, percent-encoding both:
2121

2222
[source,cpp]
@@ -33,9 +33,8 @@ they appear in the query string.
3333

3434
== Parameters in the URL
3535

36-
You do not have to use cpp:request_builder::query[query] at all: parameters
37-
written directly into the URL you supply are treated identically. These two
38-
requests are equivalent:
36+
Parameters written directly into the URL you supply are treated identically.
37+
These two requests are equivalent:
3938

4039
[source,cpp]
4140
----
@@ -52,7 +51,7 @@ auto b = co_await client.get("https://example.com/search?category=shoes&color=bl
5251

5352
== Combining Both
5453

55-
cpp:request_builder::query[query] appends to whatever the URL already carries:
54+
cpp:request_builder::query[] appends to whatever the URL already carries:
5655

5756
[source,cpp]
5857
----
@@ -64,8 +63,6 @@ auto r = co_await client.get("https://example.com/search?category=shoes")
6463

6564
== Next Steps
6665

67-
* xref:2.guide/2e.headers.adoc[Headers] — Setting request and default headers
68-
* xref:2.guide/2a.making-requests.adoc[Making Requests] — The verb functions
69-
that accept a URL
70-
* xref:2.guide/2g.authentication.adoc[Authentication] — The managed
71-
`Authorization` header
66+
* xref:2.guide/2e.headers.adoc[] — Setting request and default headers
67+
* xref:2.guide/2a.making-requests.adoc[] — The verb functions that accept a URL
68+
* xref:2.guide/2g.authentication.adoc[] — The managed `Authorization` header

doc/modules/ROOT/pages/2.guide/2g.authentication.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,10 @@ regardless of this setting.
6464
== Custom Schemes
6565

6666
For an authentication scheme Burl does not build in, you can set the
67-
`Authorization` header yourself with the builder's
68-
xref:2.guide/2e.headers.adoc[`header`] function. A header you set explicitly
69-
is sent as-is.
67+
`Authorization` header yourself with the cpp:request_builder::header[]
68+
function. A header you set explicitly is sent as-is.
7069

7170
== Next Steps
7271

73-
* xref:2.guide/2h.redirects.adoc[Redirects] — When credentials are stripped
74-
* xref:2.guide/2e.headers.adoc[Headers and Query Parameters] — Setting a
75-
scheme by hand
72+
* xref:2.guide/2h.redirects.adoc[] — When credentials are stripped
73+
* xref:2.guide/2e.headers.adoc[] — Setting a scheme by hand

doc/modules/ROOT/pages/2.guide/2h.redirects.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ std::cout << r.status_int() << '\n'; // e.g. 301
4444
std::cout << r.headers().value_or(http::field::location, "") << '\n';
4545
----
4646

47-
When redirects are followed, cpp:response::url[response::url()] reports the
47+
When redirects are followed, cpp:response::url[] reports the
4848
final URL the response came from:
4949

5050
[source,cpp]
@@ -106,13 +106,12 @@ When a redirect crosses to a different origin, the `Authorization` and
106106
dropped, so credentials meant for one host are not handed to another.
107107
cpp:client::config[config::unrestricted_auth] keeps sending them; the
108108
xref:2.guide/2g.authentication.adoc[authentication] section covers this in full.
109-
Same- origin redirects always carry credentials through.
109+
Same-origin redirects always carry credentials through.
110110

111111
== Next Steps
112112

113-
* xref:2.guide/2g.authentication.adoc[Authentication] — Cross-origin credential
114-
stripping
115-
* xref:2.guide/2i.cookies.adoc[Cookies] — How the jar follows redirects
116-
* xref:2.guide/2d.error-handling.adoc[Error Handling] —
113+
* xref:2.guide/2g.authentication.adoc[] — Cross-origin credential stripping
114+
* xref:2.guide/2i.cookies.adoc[] — How the jar follows redirects
115+
* xref:2.guide/2d.error-handling.adoc[] —
117116
cpp:error::too_many_redirects[too_many_redirects] and
118117
cpp:error::bad_redirect_response[bad_redirect_response]

doc/modules/ROOT/pages/2.guide/2i.cookies.adoc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
When cookie handling is enabled, the client stores cookies from `Set-Cookie`
1313
response headers in its cookie jar and sends matching cookies on later
14-
requests, following the storage and matching rules of RFC 6265. The jar can be
15-
inspected directly and persisted between sessions.
14+
requests, following the storage and matching rules of RFC 6265bis. The jar can
15+
be inspected directly and persisted between sessions.
1616

1717
== Enabling Cookies
1818

@@ -33,7 +33,7 @@ auto r = co_await client.get("https://example.com/account").send();
3333

3434
== The Cookie Jar
3535

36-
cpp:client::cookie_jar[client::cookie_jar()] gives direct access to the jar. The
36+
cpp:client::cookie_jar[] gives direct access to the jar. The
3737
cookies can be listed, cleared, or seeded by hand:
3838

3939
[source,cpp]
@@ -86,7 +86,5 @@ an error if a line is malformed. Empty and comment lines are skipped, except the
8686

8787
== Next Steps
8888

89-
* xref:2.guide/2h.redirects.adoc[Redirects] — How cookies and credentials follow
90-
hops
91-
* xref:2.guide/2e.headers.adoc[Headers and Query Parameters] — Setting a
92-
`Cookie` header by hand
89+
* xref:2.guide/2h.redirects.adoc[] — How cookies and credentials follow hops
90+
* xref:2.guide/2e.headers.adoc[] — Setting a `Cookie` header by hand

0 commit comments

Comments
 (0)