@@ -26,7 +26,7 @@ Every request starts with a URL:
2626req <- request(example_url())
2727req
2828# > <httr2_request>
29- # > GET http://127.0.0.1:45521 /
29+ # > GET http://127.0.0.1:41139 /
3030# > Body: empty
3131```
3232
@@ -42,7 +42,7 @@ req |> req_dry_run()
4242# > GET / HTTP/1.1
4343# > accept: */*
4444# > accept-encoding: deflate, gzip, br, zstd
45- # > host: 127.0.0.1:45521
45+ # > host: 127.0.0.1:41139
4646# > user-agent: httr2/1.2.2.9000 r-curl/7.0.0 libcurl/8.5.0
4747```
4848
@@ -57,7 +57,7 @@ information:
5757
5858- The ** path** , which is the URL stripped of details that the server
5959 already knows, i.e. the protocol (` http ` or ` https ` ), the host
60- (` localhost ` ), and the port (` 45521 ` ).
60+ (` localhost ` ), and the port (` 41139 ` ).
6161
6262- The version of the HTTP protocol. This is unimportant for our purposes
6363 because it’s handled at a lower level.
7878# > GET / HTTP/1.1
7979# > accept: application/json
8080# > accept-encoding: deflate, gzip, br, zstd
81- # > host: 127.0.0.1:45521
81+ # > host: 127.0.0.1:41139
8282# > name: Hadley
8383# > shoe-size: 11
8484# > user-agent: httr2/1.2.2.9000 r-curl/7.0.0 libcurl/8.5.0
@@ -103,7 +103,7 @@ req |>
103103# > accept-encoding: deflate, gzip, br, zstd
104104# > content-length: 15
105105# > content-type: application/json
106- # > host: 127.0.0.1:45521
106+ # > host: 127.0.0.1:41139
107107# > user-agent: httr2/1.2.2.9000 r-curl/7.0.0 libcurl/8.5.0
108108# >
109109# > {
@@ -140,7 +140,7 @@ req |>
140140# > accept-encoding: deflate, gzip, br, zstd
141141# > content-length: 7
142142# > content-type: application/x-www-form-urlencoded
143- # > host: 127.0.0.1:45521
143+ # > host: 127.0.0.1:41139
144144# > user-agent: httr2/1.2.2.9000 r-curl/7.0.0 libcurl/8.5.0
145145# >
146146# > x=1&y=a
@@ -159,19 +159,19 @@ req |>
159159# > accept: */*
160160# > accept-encoding: deflate, gzip, br, zstd
161161# > content-length: 246
162- # > content-type: multipart/form-data; boundary=------------------------ZELWLaE0m2ffg5i4pC7tbj
163- # > host: 127.0.0.1:45521
162+ # > content-type: multipart/form-data; boundary=------------------------Ak21u9UMqC4qTYu0kJq78W
163+ # > host: 127.0.0.1:41139
164164# > user-agent: httr2/1.2.2.9000 r-curl/7.0.0 libcurl/8.5.0
165165# >
166- # > --------------------------ZELWLaE0m2ffg5i4pC7tbj
166+ # > --------------------------Ak21u9UMqC4qTYu0kJq78W
167167# > Content-Disposition: form-data; name="x"
168168# >
169169# > 1
170- # > --------------------------ZELWLaE0m2ffg5i4pC7tbj
170+ # > --------------------------Ak21u9UMqC4qTYu0kJq78W
171171# > Content-Disposition: form-data; name="y"
172172# >
173173# > a
174- # > --------------------------ZELWLaE0m2ffg5i4pC7tbj --
174+ # > --------------------------Ak21u9UMqC4qTYu0kJq78W --
175175```
176176
177177If you need to send data encoded in a different form, you can use
@@ -189,7 +189,7 @@ req <- request(example_url()) |> req_url_path("/json")
189189resp <- req | > req_perform()
190190resp
191191# > <httr2_response>
192- # > GET http://127.0.0.1:45521 /json
192+ # > GET http://127.0.0.1:41139 /json
193193# > Status: 200 OK
194194# > Content-Type: application/json
195195# > Body: In memory (407 bytes)
@@ -201,7 +201,7 @@ You can see a simulation of what httr2 actually received with
201201``` r
202202resp | > resp_raw()
203203# > HTTP/1.1 200 OK
204- # > Date: Wed, 14 Jan 2026 19:31:59 GMT
204+ # > Date: Tue, 03 Mar 2026 22:14:05 GMT
205205# > Content-Type: application/json
206206# > Content-Length: 407
207207# > ETag: "de760e6d"
@@ -260,7 +260,7 @@ You can extract data from the response using the `resp_()` functions:
260260 ``` r
261261 resp | > resp_headers()
262262 # > <httr2_headers>
263- # > Date: Wed, 14 Jan 2026 19:31:59 GMT
263+ # > Date: Tue, 03 Mar 2026 22:14:05 GMT
264264 # > Content-Type: application/json
265265 # > Content-Length: 407
266266 # > ETag: "de760e6d"
0 commit comments