1

I have the following code in my class.

def authenticateUser() = CouchbaseAction("Knr"){ implicit request =>
    var finalResult = Json.obj()

    val (username, password) = loginForm.bindFromRequest.get
}

When I ran this it gives an error:

Cannot find HTTP header here

on loginForm.bindFromRequest.get

Yesterday I tried to use Javascript routes but I have now removed everything. Before adding the Javascript routes it worked properly. What may cause the problem?

2
  • Add tag to your question with exact Play version (like playframework-2.x) Commented Jun 9, 2015 at 8:28
  • What's the type of implicit request? Commented Jun 14, 2015 at 23:55

1 Answer 1

1

Does this work?

def authenticateUser() = CouchbaseAction("Knr"){ implicit request =>
    var finalResult = Json.obj()

    val (username, password) = loginForm.bindFromRequest(request).get
}

This makes the request explicit instead of implicit.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.