[Haskell-cafe] [ANN] servant 0.2 - trying to rethink webservices and APIs

Alp Mestanogullari alpmestan at gmail.com
Wed Dec 10 07:29:25 UTC 2014


Hello,

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 :

> Hello,
>
> 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
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141210/c91a68fd/attachment.html>


More information about the Haskell-Cafe mailing list