mirror of
https://github.com/monadicsystems/okapi.git
synced 2024-11-23 09:54:24 +03:00
Update NewDesign.md
This commit is contained in:
parent
3bf38dd517
commit
3e9ebbb93a
@ -647,19 +647,18 @@ Plan $$
|
||||
do
|
||||
Path.static "index"
|
||||
magicNumber <- Path.param @Int
|
||||
Path.pure magicNumber
|
||||
pure magicNumber
|
||||
do
|
||||
x <- Query.param @Int "x"
|
||||
y <- Query.option 10 $ Query.param @Int "y"
|
||||
Query.pure (x, y)
|
||||
pure (x, y)
|
||||
do pure ()
|
||||
do pure ()
|
||||
do
|
||||
itsOk <- Responder.json @Int HTTP.status200
|
||||
do
|
||||
itsOk <- Responder.json @Int HTTP.status200 do
|
||||
addSecretNumber <- ResponderHeaders.has @Int "X-SECRET"
|
||||
ResponderHeaders.pure addSecretNumber
|
||||
Responder.pure itsOk
|
||||
pure itsOk
|
||||
\magicNumber (x, y) () () responder -> do
|
||||
let newNumber = magicNumber + x * y
|
||||
print newNumber
|
||||
|
Loading…
Reference in New Issue
Block a user