Make sure tutorial can build

This commit is contained in:
Ivan Lazar Miljenovic 2017-10-09 13:22:54 +11:00
parent dc40badb7c
commit b3e35fbc79
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import Network.Wai
import Servant.API
import Servant.Docs
import Servant.Server
import Web.FormUrlEncoded(FromForm(..), ToForm(..))
```
And we'll import some things from one of our earlier modules
@ -218,6 +219,9 @@ type ExampleAPI2 = "position" :> Capture "x" Int :> Capture "y" Int :> Get '[JSO
:<|> "hello" :> QueryParam "name" String :> Get '[JSON] HelloMessage
:<|> "marketing" :> ReqBody '[JSON, FormUrlEncoded] ClientInfo :> Post '[JSON] Email
instance ToForm ClientInfo
instance FromForm ClientInfo
exampleAPI2 :: Proxy ExampleAPI2
exampleAPI2 = Proxy

View File

@ -31,6 +31,7 @@ library
, servant-docs == 0.11.*
, servant-js >= 0.9 && <0.10
, warp
, http-api-data
, http-media
, lucid
, time