Troubleshooting

Here are the scenarios you might come across where you may need to troubleshoot:

  1. Coming across an error during compilation: you cannot find any HTTP request header here.

    You get this error even after you have defined the Action using a RequestHeader.

    Most of the methods used in Play that deal with requests, expect an implicit RequestHeader. This convention has been followed in order to keep the code simple. For example, let's look at the controller trait here:

    trait Controller extends Results with BodyParsers with HttpProtocol with Status with HeaderNames with ContentTypes with RequestExtractors with Rendering { //Provides an empty `Action` implementation: the result is a standard 'Not implemented yet' result page. val TODO = Action ...

Get Mastering Play Framework for Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.