Please log in to watch this conference skillscast.
Most REST frameworks can match request URIs and then pass the raw request to some kind of handler function. But is that really enough? Spray's routing DSL is an incredibly powerful toolkit for writing high-performance REST APIs. It takes care of every aspect of Http request handling and response building in an elegant, readable, and highly functional way. But as the saying goes (sort of): with great power comes a great learning curve!
This session will start with an introduction to the Spray/Akka-http routing DSL, making sure to go beyond the basics. It will also show examples of real-world application code to give you a feeling for what the end result looks like. The session will conclude with a discussion of some things to watch out for on your way to becoming an expert user.
-The routing DSL
-Real world examples
-Things to watch out for
-The routing DSL
-An overview of the builtin directives.
-Combining directives into route handlers
-Marshalling and unmarshalling your (case) classes
-Dealing with rejection
-Dealing with Futures
-Writing your own directives
Real world examples
-A simple OAuth2 server
Things to watch out for
- Confusing errors
- If you block, things break
YOU MAY ALSO LIKE:
- The JVM as a platform for building smart contracts (in London on 28th June 2017)
- London Microservices User Group- July (in London on 5th July 2017)
- Infiniteconf 2017 - the conference on Big Data and Fast Data (in London on 6th - 7th July 2017)
- Uncle Bob's Advanced TDD (in London on 30th - 31st October 2017)
Beyond URL Matching: Mastering the Spray/Akka-Http Routing DSL
Age Mooij discovered Scala in 2009 after many years of Java development. In that same year he founded the Dutch Scala Enthusiasts user group and started giving Scala Labs workshops.