[Haskell-cafe] [ANN] servant 0.2 - trying to rethink webservices and APIs
alpmestan at gmail.com
Wed Dec 10 07:29:25 UTC 2014
Querystring parameters are optional. The corresponding handler argument is
automatically a Maybe, because one can reach this endpoint while not
specifying a value for that param.
I understand the operator naming scheme can be a bit odd when you're not
used to it, we'll see what suits people the most after we get more feedback
on that :)
Le 10 déc. 2014 00:18, "Wojtek Narczyński" <wojtek at power.com.pl> a écrit :
> Interesting, thank you!
> Can your library handle optional parameters? I guess, not right now but
> can be done, right?
> At first glance I thought the :> operator had something to do with
> subtyping.How about defining the operators somehow like this:
> type UserAPI = "users" </> "search" <?> QueryParam "q" Text <,> QueryParam
> "n" Word64 ::: Get [User]
> In addition to more visual resemblance to http, you could probably enforce
> more type safety this way, too.
> Kind regards,
> Wojtek Narczynski
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe