blob: 05a87611d9951b7384b29f6f4fa3566e597f25fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package test.cask
object FormJsonPost extends cask.MainRoutes{
@cask.postJson("/json")
def jsonEndpoint(value1: ujson.Js.Value, value2: Seq[Int]) = {
"OK " + value1 + " " + value2
}
@cask.postForm("/form")
def formEndpoint(value1: cask.FormValue, value2: Seq[Int]) = {
"OK " + value1 + " " + value2
}
@cask.postForm("/upload")
def uploadFile(image: cask.FormFile) = {
image.fileName
}
initialize()
}
|