[web-devel] web-routes-quasi

Michael Snoyman michael at snoyman.com
Tue Apr 6 15:38:27 EDT 2010


It's like you read my mind... I very consciously designed this in such a way
that it would be possible to do this. More to the point: I think it would be
possible to use web-routes-quasi to create a RESTful API and then
auto-generate the basic API documentation. I'd like to eventually figure out
a way to support GET and POST parameters as well for this.

Anyway, for the basic [String] methods, I can add support for it in the
future; I'd rather wait until we have the rest of web-routes settled down
first.

(Of course, a patch is always welcome.)

Michael

On Tue, Apr 6, 2010 at 1:16 AM, Peter Robinson <thaldyron at gmail.com> wrote:

> Again, nice work! :) The web-routes-quasi package makes writing routes
> quite
> enjoyable. One thing that I was wondering about is, is it possible to
> get the list of supported methods (as [String]) for a given url?
>
>  Peter
>
>
> On 4 April 2010 20:34, Michael Snoyman <michael at snoyman.com> wrote:
> > ... and now that's done :-). You can use whatever methods you want now,
> and
> > it also solves the annoying issue when importing both Web.Routes.Quasi
> and
> > Network.Wai.
> > Michael
> >
> > On Sun, Apr 4, 2010 at 10:16 AM, Michael Snoyman <michael at snoyman.com>
> > wrote:
> >>
> >> Because I want to eventually get rid of the Method datatype entirely and
> >> allow arbitrary methods ;).
> >> Michael
> >>
> >> On Sat, Apr 3, 2010 at 9:53 AM, Peter Robinson <thaldyron at gmail.com>
> >> wrote:
> >>>
> >>> Nice work!
> >>>
> >>> Is there a specific reason for excluding HEAD and OPTIONS?
> >>>
> >>>  Peter
> >>>
> >>> On 3 April 2010 00:51, Michael Snoyman <michael at snoyman.com> wrote:
> >>> > web-routes-quasi is now at the point where it can be used for sites,
> >>> > and I'd
> >>> > love to hear some feedback. I've put together a little sample that
> >>> > demonstrates how you can use quasi-quoting and define your routes,
> >>> > embed
> >>> > subsites and serve the resulting application via WAI. (My example
> uses
> >>> > WAI,
> >>> > but the package itself is not tied to WAI.)
> >>> > The code is on github[1]; the main function for the blog is in
> blog.hs
> >>> > (with
> >>> > the lowercase b). I believe this just depends on Jeremy's web-routes
> >>> > package, wai and wai-extra.
> >>> > Note that I did not use web-routes-wai; I think there are some
> problems
> >>> > in
> >>> > there for breaking up the pathinfo, and I didn't have time to dig
> >>> > through
> >>> > it. Also, this package currently ignores entirely the defaultPage
> >>> > component
> >>> > of Site, though if there is desire support can be added for it.
> >>> > One minor bug is that you can't have an alternate GET, POST, PUT or
> >>> > DELETE
> >>> > constructor imported; hopefully that will get cleaned up.
> >>> > Any comments and suggestions are welcome! My goal is to port Yesod
> over
> >>> > to
> >>> > this as soon as the web-routes set of packages are released, so if
> >>> > you're
> >>> > interested in Yesod, you should be interested in this too ;).
> >>> > Michael
> >>> > [1] http://github.com/snoyberg/web-routes-quasi
> >>> > _______________________________________________
> >>> > web-devel mailing list
> >>> > web-devel at haskell.org
> >>> > http://www.haskell.org/mailman/listinfo/web-devel
> >>> >
> >>> >
> >>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100406/7e35bd1e/attachment.html


More information about the web-devel mailing list