File tree 3 files changed +12
-11
lines changed
3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import scala .concurrent .ExecutionContext .Implicits .global
5
5
6
- import sttp .client4 .quick . *
6
+ import sttp .client4 .*
7
7
8
- val request = quickRequest
8
+ val backend = DefaultFutureBackend ()
9
+ val request = basicRequest
9
10
.post(uri " https://example.com/ " )
10
11
.body(" Lorem ipsum" )
11
12
12
- for response <- request .send() do
13
- println(response.body.linesIterator.size )
14
- // $ 0
13
+ for response <- backend .send(request ) do
14
+ println(response.code )
15
+ // $ 403
Original file line number Diff line number Diff line change 2
2
3
3
import sttp .client4 .quick .*
4
4
5
- val response = quickRequest
5
+ val response = basicRequest
6
6
.post(uri " https://example.com/ " )
7
7
.body(" Lorem ipsum" )
8
8
.send()
9
9
10
- println(response.body.linesIterator.size )
11
- // $ 0
10
+ println(response.code )
11
+ // $ 403
Original file line number Diff line number Diff line change 2
2
3
3
import sttp .client4 .quick .*
4
4
5
- val response = quickRequest
5
+ val response = basicRequest
6
6
.post(uri " https://example.com/ " )
7
7
.body(" Lorem ipsum" )
8
8
.send()
9
9
10
- println(response.body.linesIterator.size )
11
- // $ 0
10
+ println(response.code )
11
+ // $ 403
You can’t perform that action at this time.
0 commit comments