@@ -12,7 +12,7 @@ If you use Requests-Scala and like it, you will probably enjoy the following boo
1212- [ * Hands-on Scala Programming* ] ( https://www.handsonscala.com/ )
1313
1414* Hands-on Scala* has uses Requests-Scala extensively throughout the book, and has
15- the entirety of * Chapter 12: Working with HTTP APIs* dedicated to
15+ the entirety of * Chapter 12: Working with HTTP APIs* dedicated to
1616the library. * Hands-on Scala* is a great way to level up your skills in Scala
1717in general and Requests-Scala in particular.
1818
@@ -87,7 +87,7 @@ val r = requests.options("http://httpbin.org/get")
8787
8888``` scala
8989val r = requests.get(
90- " http://httpbin.org/get" ,
90+ " http://httpbin.org/get" ,
9191 params = Map (" key1" -> " value1" , " key2" -> " value2" )
9292)
9393```
@@ -191,9 +191,9 @@ too big to fit in memory, while still benefiting from most of Requests' friendly
191191
192192## Handling JSON
193193
194- Requests does not provide any built-in JSON support, but you can easily use a
195- third-party JSON library to work with it. This example shows how to use
196- [ uJson] ( http://www.lihaoyi.com/upickle/ ) talk to a HTTP endpoint that requires a
194+ Requests does not provide any built-in JSON support, but you can easily use a
195+ third-party JSON library to work with it. This example shows how to use
196+ [ uJson] ( http://www.lihaoyi.com/upickle/ ) talk to a HTTP endpoint that requires a
197197JSON-formatted body, either using ` upickle.default.stream ` :
198198
199199``` scala
@@ -243,9 +243,9 @@ val r = requests.post(
243243 data = requests.MultiPart (
244244 requests.MultiItem (" name" , new java.io.File (" build.sc" ), " file.txt" ),
245245 // you can upload strings, and file name is optional
246- requests.MultiItem (" name2" , " Hello" ),
246+ requests.MultiItem (" name2" , " Hello" ),
247247 // bytes arrays are ok too
248- requests.MultiItem (" name3" , Array [Byte ](1 , 2 , 3 , 4 ))
248+ requests.MultiItem (" name3" , Array [Byte ](1 , 2 , 3 , 4 ))
249249 )
250250)
251251```
@@ -280,7 +280,7 @@ requests.get("https://httpbin.org/delay/1", readTimeout = 10)
280280// TimeoutException
281281
282282requests.get(" https://httpbin.org/delay/1" , readTimeout = 1500 )
283- // ok
283+ // ok
284284
285285requests.get(" https://httpbin.org/delay/3" , readTimeout = 1500 )
286286// TimeoutException
@@ -490,7 +490,7 @@ headers, cookies or other things:
490490
491491``` scala
492492val s = requests.Session (
493- headers = Map (" x-special-header" -> " omg" ),
493+ headers = Map (" x-special-header" -> " omg" ),
494494 cookieValues = Map (" cookie" -> " vanilla" )
495495)
496496
@@ -531,7 +531,7 @@ common Scala HTTP clients:
531531``` scala
532532// Requests-Scala
533533val r = requests.get(
534- " https://api.github.com/search/repositories" ,
534+ " https://api.github.com/search/repositories" ,
535535 params = Map (" q" -> " http language:scala" , " sort" -> " stars" )
536536)
537537
@@ -619,12 +619,12 @@ val query = "http language:scala"
619619// the `query` parameter is automatically url-encoded
620620// `sort` is removed, as the value is not defined
621621val request = sttp.get(uri " https://api.github.com/search/repositories?q= $query&sort= $sort" )
622-
622+
623623implicit val backend = HttpURLConnectionBackend ()
624624val response = request.send()
625625
626- // response.unsafeBody: by default read into a String
627- println(response.unsafeBody)
626+ // response.unsafeBody: by default read into a String
627+ println(response.unsafeBody)
628628```
629629``` scala
630630// Dispatch
@@ -656,6 +656,10 @@ codebase or project!
656656
657657## Changelog
658658
659+ ### 0.6.7
660+
661+ - Add support for Scala 3.0.0-RC2
662+
659663### 0.6.5
660664
661665- ` requests.Response ` now implements the ` geny.Readable ` interface, and can be
0 commit comments