You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backends/akka.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,14 @@ Note that you'll also need an explicit dependency on akka-streams, as akka-http
16
16
17
17
Next you'll need to add create the backend instance:
18
18
19
-
```scala mdoc:compile-only
19
+
```scala
20
20
importsttp.client4.akkahttp._
21
21
valbackend=AkkaHttpBackend()
22
22
```
23
23
24
24
or, if you'd like to use an existing actor system:
25
25
26
-
```scala mdoc:compile-only
26
+
```scala
27
27
importsttp.client4.akkahttp._
28
28
importakka.actor.ActorSystem
29
29
@@ -35,7 +35,7 @@ This backend supports sending and receiving [akka-streams](http://doc.akka.io/do
35
35
36
36
To set the request body as a stream:
37
37
38
-
```scala mdoc:compile-only
38
+
```scala
39
39
importsttp.capabilities.akka.AkkaStreams
40
40
importsttp.client4._
41
41
@@ -51,7 +51,7 @@ basicRequest
51
51
52
52
To receive the response body as a stream:
53
53
54
-
```scala mdoc:compile-only
54
+
```scala
55
55
importscala.concurrent.Future
56
56
importsttp.capabilities.akka.AkkaStreams
57
57
importsttp.client4._
@@ -79,7 +79,7 @@ That way, you can "mock" a server that the backend will talk to, without startin
79
79
80
80
If your application provides a client library for its dependants to use, this is a great way to ensure that the client actually matches the routes exposed by your application:
81
81
82
-
```scala mdoc:compile-only
82
+
```scala
83
83
importsttp.client4.akkahttp._
84
84
importakka.http.scaladsl.server.Route
85
85
importakka.actor.ActorSystem
@@ -101,7 +101,7 @@ Non-standard behavior:
101
101
102
102
Received data streams can be parsed to a stream of server-sent events (SSE):
Copy file name to clipboardExpand all lines: docs/backends/future.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,18 @@
2
2
3
3
There are several backend implementations which are `scala.concurrent.Future`-based. These backends are **asynchronous**, sending a request is a non-blocking operation and results in a response wrapped in a `Future`.
4
4
5
-
Apart from the ones described below, also the [Akka](akka.md)backend is`Future`-based.
5
+
Apart from the ones described below, also the [Pekko](pekko.md) & [Akka](akka.md)backends are`Future`-based.
Copy file name to clipboardExpand all lines: docs/backends/pekko.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,14 @@ Note that you'll also need an explicit dependency on pekko-streams, as pekko-htt
17
17
Next you'll need to add create the backend instance:
18
18
19
19
```scala mdoc:compile-only
20
-
importsttp.client4.pekkohttp._
20
+
importsttp.client4.pekkohttp.*
21
21
valbackend=PekkoHttpBackend()
22
22
```
23
23
24
24
or, if you'd like to use an existing actor system:
25
25
26
26
```scala mdoc:compile-only
27
-
importsttp.client4.pekkohttp._
27
+
importsttp.client4.pekkohttp.*
28
28
importorg.apache.pekko.actor.ActorSystem
29
29
30
30
valactorSystem:ActorSystem=???
@@ -37,7 +37,7 @@ To set the request body as a stream:
37
37
38
38
```scala mdoc:compile-only
39
39
importsttp.capabilities.pekko.PekkoStreams
40
-
importsttp.client4._
40
+
importsttp.client4.*
41
41
42
42
importorg.apache.pekko
43
43
importpekko.stream.scaladsl.Source
@@ -55,7 +55,7 @@ To receive the response body as a stream:
55
55
```scala mdoc:compile-only
56
56
importscala.concurrent.Future
57
57
importsttp.capabilities.pekko.PekkoStreams
58
-
importsttp.client4._
58
+
importsttp.client4.*
59
59
importsttp.client4.pekkohttp.PekkoHttpBackend
60
60
61
61
importorg.apache.pekko
@@ -82,7 +82,7 @@ That way, you can "mock" a server that the backend will talk to, without startin
82
82
If your application provides a client library for its dependants to use, this is a great way to ensure that the client actually matches the routes exposed by your application:
0 commit comments