O'Reilly logo

Learning Play! Framework 2 by Andy Petrella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Dealing with Content

A web application always has, at some point, the need to deal with multiple types of content. Common content types include JSON, XML, HTML, but there could also be images or even videos to be stored and streamed. Play! 2 provides a clean way of dealing with such content types with the help of body parsers.

We won't cover the implementation details of such body parsers, because it's purely based on a functional concept, Iteratee, and thus their implementations are in Scala only. However, we'll see how they are used and how we can gain benefits from them.

In this chapter, we'll update and clean up a bit of what we have been doing so far in order to enable several workflows. So we will only be using examples we have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required