diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-07-20 17:03:21 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-07-20 17:12:38 +0800 |
commit | 4eab92016a793eb58782baa7c865498d66f611f1 (patch) | |
tree | 750b44d3d904c8443572eb908ebd7a3cc3fcab57 /cask/test/src/test | |
parent | 71321497b5a07261684f3a71228071c1f436dae0 (diff) | |
download | cask-4eab92016a793eb58782baa7c865498d66f611f1.tar.gz cask-4eab92016a793eb58782baa7c865498d66f611f1.tar.bz2 cask-4eab92016a793eb58782baa7c865498d66f611f1.zip |
stick with blocking mode for now
Diffstat (limited to 'cask/test/src/test')
-rw-r--r-- | cask/test/src/test/cask/CaskTest.scala | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/cask/test/src/test/cask/CaskTest.scala b/cask/test/src/test/cask/CaskTest.scala index a2e0f47..5330dce 100644 --- a/cask/test/src/test/cask/CaskTest.scala +++ b/cask/test/src/test/cask/CaskTest.scala @@ -1,6 +1,5 @@ package test.cask -import io.undertow.io.Receiver.{ErrorCallback, FullBytesCallback} import io.undertow.server.HttpServerExchange object MyServer extends cask.Routes{ @@ -16,23 +15,11 @@ object MyServer extends cask.Routes{ @cask.get("/path/::subPath") def showSubpath(x: HttpServerExchange, subPath: String) = { - x.getRequestReceiver().receiveFullBytes((exchange, data) => { - - }: FullBytesCallback, - (exchange, exception) => { - - }: ErrorCallback - ) + val length = x.getInputStream.readAllBytes().length println(x) - s"Subpath $subPath" + s"Subpath $subPath + $length" } -// @cask.post("/echo-size") -// def echoSize(x: HttpServerExchange, subPath: String) = { -// println(x) -// s"Subpath $subPath" -// } - initialize() } |