diff options
author | Li Haoyi <haoyi.li@databricks.com> | 2019-09-14 18:34:57 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.li@databricks.com> | 2019-09-14 18:36:52 +0800 |
commit | 85e982a6bf9bd82524baf53546b31d85b426fa62 (patch) | |
tree | 4504cdc4f11543dcbeec3496707b95a464b70b86 /docs | |
parent | 2c1dcc3cd33fbd2c2c921f20f67c45ce48c1e8bc (diff) | |
download | cask-85e982a6bf9bd82524baf53546b31d85b426fa62.tar.gz cask-85e982a6bf9bd82524baf53546b31d85b426fa62.tar.bz2 cask-85e982a6bf9bd82524baf53546b31d85b426fa62.zip |
`InnerResponse` is now a type param instead of member, allowing better error messages through `cask.internal.Conversion`:
```
Cannot return java.io.ByteArrayInputStream as a cask.model.Response[cask.endpoints.JsonData]
```
Diffstat (limited to 'docs')
-rw-r--r-- | docs/pages/1 - Cask: a Scala HTTP micro-framework.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md index 093c8c3..52653d2 100644 --- a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md +++ b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md @@ -162,13 +162,13 @@ what to do in each case. You can use the `@cask.route` annotation to do so $$$formJsonPost If you need to handle a JSON-encoded POST request, you can use the -`@cask.postJson` decorator. This assumes the posted request body is a JSON dict, -and uses its keys to populate the endpoint's parameters, either as raw -`ujson.Js.Value`s or deserialized into `Seq[Int]`s or other things. -Deserialization is handled using the -[uPickle](https://github.com/lihaoyi/upickle) JSON library, though you could -write your own version of `postJson` to work with any other JSON library of your -choice. +`@cask.postJson` decorator. This assumes the posted request body is a +JSON dict, and uses its keys to populate the endpoint's parameters, +either as raw `ujson.Value`s or deserialized into `Seq[Int]`s or other +things. Deserialization is handled using the +[uPickle](https://github.com/lihaoyi/upickle) JSON library, though you +could write your own version of `postJson` to work with any other JSON +library of your choice. Similarly, you can mark endpoints as `@cask.postForm`, in which case the endpoints params will be taken from the form-encoded POST body either raw (as |