Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Last active December 12, 2015 07:48
Show Gist options
  • Save tototoshi/4739295 to your computer and use it in GitHub Desktop.
Save tototoshi/4739295 to your computer and use it in GitHub Desktop.
[play_ja:504]
package controllers
import play.api._
import play.api.mvc._
object Application extends Controller {
def index = Action {
Ok(views.html.index())
}
def test = Action { implicit request =>
Ok(request.body.asFormUrlEncoded.mkString)
}
}
<form method="post" id="" action="@routes.Application.test">
<img name="name" src="data:image/jpg;base64,@io.Source.fromFile("conf/testimage.jpg").getLines.mkString" class="" alt="" />
<input type="text" name="text01" value="foo" />
<input type="submit" name="submit" value="submit" />
</form>
GET / controllers.Application.index
POST /test controllers.Application.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment