Package maintainers and Hackage trustees are allowed to edit certain bits
of package metadata after a release, without uploading a new tarball.
Note that the tarball itself is never changed, just the metadata that is
stored separately. For more information about metadata revisions, please
refer to the
Hackage Metadata Revisions FAQ.
No. |
Time |
User |
SHA256 |
-r1 (apiary-1.2.0-r1) |
2014-12-04T19:17:09Z |
HirotomoMoriwaki |
afb096e88b165253485545c77a2ec4975c53cd591cc28b9efa334ec30e1c82ae
|
|
Changed description
from Simple and type safe web framework that can be automatically generate API documentation.
@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
import Web.Apiary
import Network.Wai.Handler.Warp
import qualified Data.ByteString.Lazy.Char8 as L
main :: IO ()
main = runApiary (run 3000) def $ do
  [capture|/age::Int|] . ([key|name|] =: pLazyByteString) . method GET . action $ do
      (age, name) <- [params|age,name|]
      guard (age >= 18)
      contentType "text/html"
      mapM_ lazyBytes ["<h1>Hello, ", name, "!</h1>\\n"]
@
@
$ curl localhost:3000
404 Page Notfound.
$ curl 'localhost:3000/20?name=arice'
<h1>Hello, arice!</h1>
$ curl 'localhost:3000/15?name=bob'
404 Page Notfound.
$ curl -XPOST 'localhost:3000/20?name=arice'
404 Page Notfound.
@
* High performance(benchmark: <https://github.com/philopon/apiary-benchmark>).
* Nestable route handling(Apiary Monad; capture, method and more.).
* Type safe route filter.
* Auto generate API documentation(example: <http://best-haskell.herokuapp.com/api/documentation>).
more examples: <https://github.com/philopon/apiary/blob/v1.2.0/examples/>
live demo: <http://best-haskell.herokuapp.com/> (source code: <https://github.com/philopon/best-haskell>)
to Simple and type safe web framework that can be automatically generate API documentation.
@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
import Web.Apiary
import Network.Wai.Handler.Warp
import qualified Data.ByteString.Lazy.Char8 as L
main :: IO ()
main = runApiary (run 3000) def $ do
  [capture|/age::Int|] . ([key|name|] =: pLazyByteString) . method GET . action $ do
      (age, name) <- [params|age,name|]
      guard (age >= 18)
      contentType "text/html"
      mapM_ appendLazyBytes ["<h1>Hello, ", name, "!</h1>\\n"]
@
@
$ curl localhost:3000
404 Page Notfound.
$ curl 'localhost:3000/20?name=arice'
<h1>Hello, arice!</h1>
$ curl 'localhost:3000/15?name=bob'
404 Page Notfound.
$ curl -XPOST 'localhost:3000/20?name=arice'
404 Page Notfound.
@
* High performance(benchmark: <https://github.com/philopon/apiary-benchmark>).
* Nestable route handling(Apiary Monad; capture, method and more.).
* Type safe route filter.
* Auto generate API documentation(example: <http://best-haskell.herokuapp.com/api/documentation>).
more examples: <https://github.com/philopon/apiary/blob/v1.2.0/examples/>
live demo: <http://best-haskell.herokuapp.com/> (source code: <https://github.com/philopon/best-haskell>)
|
-r0 (apiary-1.2.0-r0) |
2014-12-04T19:10:02Z |
HirotomoMoriwaki |
b0a63180f6fb9565078eff5c2e54c1c50bf24dca4235fc0e635def7fac5c466a
|
|
|