It&#39;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&#39;d like to eventually figure out a way to support GET and POST parameters as well for this.<div>
<br></div><div>Anyway, for the basic [String] methods, I can add support for it in the future; I&#39;d rather wait until we have the rest of web-routes settled down first.</div><div><br></div><div>(Of course, a patch is always welcome.)</div>
<div><br></div><div>Michael<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 1:16 AM, Peter Robinson <span dir="ltr">&lt;<a href="mailto:thaldyron@gmail.com">thaldyron@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Again, nice work! :) The web-routes-quasi package makes writing routes quite<br>
enjoyable. One thing that I was wondering about is, is it possible to<br>
get the list of supported methods (as [String]) for a given url?<br>
<font color="#888888"><br>
  Peter<br>
</font><div><div></div><div class="h5"><br>
<br>
On 4 April 2010 20:34, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
&gt; ... and now that&#39;s done :-). You can use whatever methods you want now, and<br>
&gt; it also solves the annoying issue when importing both Web.Routes.Quasi and<br>
&gt; Network.Wai.<br>
&gt; Michael<br>
&gt;<br>
&gt; On Sun, Apr 4, 2010 at 10:16 AM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Because I want to eventually get rid of the Method datatype entirely and<br>
&gt;&gt; allow arbitrary methods ;).<br>
&gt;&gt; Michael<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Apr 3, 2010 at 9:53 AM, Peter Robinson &lt;<a href="mailto:thaldyron@gmail.com">thaldyron@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Nice work!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Is there a specific reason for excluding HEAD and OPTIONS?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  Peter<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 3 April 2010 00:51, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; web-routes-quasi is now at the point where it can be used for sites,<br>
&gt;&gt;&gt; &gt; and I&#39;d<br>
&gt;&gt;&gt; &gt; love to hear some feedback. I&#39;ve put together a little sample that<br>
&gt;&gt;&gt; &gt; demonstrates how you can use quasi-quoting and define your routes,<br>
&gt;&gt;&gt; &gt; embed<br>
&gt;&gt;&gt; &gt; subsites and serve the resulting application via WAI. (My example uses<br>
&gt;&gt;&gt; &gt; WAI,<br>
&gt;&gt;&gt; &gt; but the package itself is not tied to WAI.)<br>
&gt;&gt;&gt; &gt; The code is on github[1]; the main function for the blog is in blog.hs<br>
&gt;&gt;&gt; &gt; (with<br>
&gt;&gt;&gt; &gt; the lowercase b). I believe this just depends on Jeremy&#39;s web-routes<br>
&gt;&gt;&gt; &gt; package, wai and wai-extra.<br>
&gt;&gt;&gt; &gt; Note that I did not use web-routes-wai; I think there are some problems<br>
&gt;&gt;&gt; &gt; in<br>
&gt;&gt;&gt; &gt; there for breaking up the pathinfo, and I didn&#39;t have time to dig<br>
&gt;&gt;&gt; &gt; through<br>
&gt;&gt;&gt; &gt; it. Also, this package currently ignores entirely the defaultPage<br>
&gt;&gt;&gt; &gt; component<br>
&gt;&gt;&gt; &gt; of Site, though if there is desire support can be added for it.<br>
&gt;&gt;&gt; &gt; One minor bug is that you can&#39;t have an alternate GET, POST, PUT or<br>
&gt;&gt;&gt; &gt; DELETE<br>
&gt;&gt;&gt; &gt; constructor imported; hopefully that will get cleaned up.<br>
&gt;&gt;&gt; &gt; Any comments and suggestions are welcome! My goal is to port Yesod over<br>
&gt;&gt;&gt; &gt; to<br>
&gt;&gt;&gt; &gt; this as soon as the web-routes set of packages are released, so if<br>
&gt;&gt;&gt; &gt; you&#39;re<br>
&gt;&gt;&gt; &gt; interested in Yesod, you should be interested in this too ;).<br>
&gt;&gt;&gt; &gt; Michael<br>
&gt;&gt;&gt; &gt; [1] <a href="http://github.com/snoyberg/web-routes-quasi" target="_blank">http://github.com/snoyberg/web-routes-quasi</a><br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; web-devel mailing list<br>
&gt;&gt;&gt; &gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt;&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>