File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 33
44import scala .concurrent .ExecutionContext .Implicits .global
55
6- import sttp .client4 .quick . *
6+ import sttp .client4 .*
77
8- val request = quickRequest
8+ val backend = DefaultFutureBackend ()
9+ val request = basicRequest
910 .post(uri " https://example.com/ " )
1011 .body(" Lorem ipsum" )
1112
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 22
33import sttp .client4 .quick .*
44
5- val response = quickRequest
5+ val response = basicRequest
66 .post(uri " https://example.com/ " )
77 .body(" Lorem ipsum" )
88 .send()
99
10- println(response.body.linesIterator.size )
11- // $ 0
10+ println(response.code )
11+ // $ 403
Original file line number Diff line number Diff line change 22
33import sttp .client4 .quick .*
44
5- val response = quickRequest
5+ val response = basicRequest
66 .post(uri " https://example.com/ " )
77 .body(" Lorem ipsum" )
88 .send()
99
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