Skip to content

Commit

Permalink
[Documentation] Update uri.md — Was it a typo or did I misunderstand ? (
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoireaux committed Feb 2, 2024
1 parent db80192 commit aa37fbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/model/uri.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import sttp.client4._
// the embedded / is escaped
println(uri"http://example.org/${"a/b"}")

// the embedded / is not escaped
// the literal / is not escaped
println(uri"http://example.org/${"a"}/${"b"}")

// the embedded : is not escaped
Expand Down Expand Up @@ -132,7 +132,7 @@ which is an ordinary `case class`, will contain a path segment with `a b`.

When parsing, that includes creating URIs from constant strings e.g. `uri"http://example.com/a%20b"`, all of the
components are decoded and stored in this form. This means that `Uri` might **not** exactly preserve the original
form, in which path segments or query parameters have been writte down (this might change in a future major release,
form, in which path segments or query parameters have been written down (this might change in a future major release,
though).

When serialising the `Uri` back to a `String`, the code follows the escaping rules defined in
Expand All @@ -156,4 +156,4 @@ println(uri"http://example.com?a=b/?c%26d".querySegmentsEncoding(Uri.QuerySegmen

// compare to:
println(uri"http://example.com?a=b/?c%26d")
```
```

0 comments on commit aa37fbf

Please sign in to comment.