blob: 6dc82d39fcde4082ffa9f8e67361cf6f34a8b04d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package app
import java.io.ByteArrayInputStream
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()
}
|