Skip to content

Commit 3713e61

Browse files
committed
change examples to httpbin.org, fix ws import
1 parent ff9eb8d commit 3713e61

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

_overviews/toolkit/http-client-request-body.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To send a POST request with a string body, you can chain `post` and `body` on a
1818
import sttp.client4.quick._
1919

2020
val response = quickRequest
21-
.post(uri"https://example.com/")
21+
.post(uri"https://httpbin.org/post")
2222
.body("Lorem ipsum")
2323
.send()
2424

@@ -31,7 +31,7 @@ println(response.code)
3131
import sttp.client4.quick.*
3232

3333
val response = quickRequest
34-
.post(uri"https://example.com/")
34+
.post(uri"https://httpbin.org/post")
3535
.body("Lorem ipsum")
3636
.send()
3737

@@ -51,7 +51,7 @@ The `body` method can also take a `Array[Byte]`, a `ByteBuffer` or an `InputStre
5151
{% tab 'Scala 2 and 3' %}
5252
```scala mdoc
5353
val bytes: Array[Byte] = "john".getBytes
54-
val request = quickRequest.post(uri"https://example.com/").body(bytes)
54+
val request = quickRequest.post(uri"https://httpbin.org/post").body(bytes)
5555
```
5656
{% endtab %}
5757
{% endtabs %}

_overviews/toolkit/http-client-what-else.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import scala.concurrent.{Await, Future}
5555
import scala.concurrent.ExecutionContext.Implicits.global
5656

5757
import sttp.client4._
58+
import sttp.client4.ws.async._
5859
import sttp.ws.WebSocket
5960

6061
val asyncBackend = DefaultFutureBackend()
@@ -83,6 +84,7 @@ import scala.concurrent.{Await, Future}
8384
import scala.concurrent.ExecutionContext.Implicits.global
8485

8586
import sttp.client4.*
87+
import sttp.client4.ws.async.*
8688
import sttp.ws.WebSocket
8789

8890
val asyncBackend = DefaultFutureBackend()

0 commit comments

Comments
 (0)