sttp: the Scala HTTP client that you always wanted! von Adam Warski · · 380 Besichtigungen · Scala Days











Embed <div id="presentation-embed-38908165"></div> <script src='https://slideslive.com/embed_presentation.js'></script> <script> embed = new SlidesLiveEmbed('presentation-embed-38908165', { presentationId: '38908165', autoPlay: false, // change to true to autoplay the embedded presentation verticalEnabled: true }); </script>

There is a number of great Scala HTTP libraries, however on the API side, we can do better! That's where sttp comes in: it's goal is to provide a simple, type-safe API for defining & sending HTTP requests, while leveraging battle-proven backends. In the no-slides, purely live-coding talk we'll go through the main features of sttp: the URI interpolator, API for building requests, decoupling request definition and execution. Plus, integrations with a variety of effect-wrapping stacks, mean you can use the same programmer-friendly API regardless if you use Akka Streams, Monix, Scalaz or Cats! Required knowledge Familiarity with Scala's syntax, some experience with Scala programming. Learning objectives become familiar with sttp, how to describe & send synchronous / asynchronous requests, using any of the available backends (e.g. akka-http, async http client) learn about its API design and the rationale behind some design decisions, which has some nice properties: type-safety, discoverability, immutability of data structures, separation of definition & execution I am one of the co-founders of SoftwareMill, where I code mainly using Scala and other interesting technologies. I am involved in open-source projects, such as sttp, MacWire, Quicklens and others. I have been a speaker at major conferences, such as ScalaDays, LambdaConf and Devoxx. Apart from writing software, in my free time I try to read the Internet on various (functional) programming-related subjects. Any ideas or insights usually end up with a blog (https://softwaremill.com/blog).