Pure functional HTTP APIs in Scala
This book is 95% complete
Last updated on 2019-10-09
About the Book
This book is intended for the intermediate Scala programmer who is interested in functional programming and works mainly on the web service backend side. Ideally she has experience with libraries like Akka HTTP and Slick which are in heavy use in that area.
However maybe you have wondered if we can't do better even though aforementioned projects are battle tested and proven.
The answer to this can be found in this book which is intended to be read from cover to cover in the given order. Within the book the following libraries will be used: Cats, Cats Effect, http4s, Doobie, Refined, fs2, tapir and probably others. ;-)
Code and book source can be found in the following repository: https://github.com/jan0sch/pfhais
- About this book
- Copyleft Notice
Our use case
- Data model
- HTTP API
- Service specification
The state of the art
Maybe there is another way
- Database layer
- Akka-HTTP routes
- Pure configuration handling
- Database layer
- http4s routes
What about tests?
- Testing the impure service
- Testing the pure service
- Our environment
Documenting your API
- The lay of the land
- Using types to describe an API
- A pure implementation using tapir.
- Impure implementation
Electronic Frontier Foundation
Defending your civil liberties in a digital world.https://www.eff.org/
Based in San Francisco, EFF is a donor-supported membership organization working to protect fundamental rights regardless of technology.
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. Free App. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.