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@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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe