[Catalyst] Sanity Check -- requesting feedback on chaining
approach
Dave Rolsky
autarch at urth.org
Thu Feb 17 19:50:38 GMT 2011
On Thu, 17 Feb 2011, will trillich wrote:
> Okay, so there's a link in a web page that the browser sees that tells it
> "when following *this* link, ask for a CSV file, as opposed to that normal
> HTML hooey you usually ask for." How do we do that, if not thru a URL?
/path/to/xyzzy?content-type=text/csv
> Or maybe I'm missing something really obvious...
You need to read the Cat::Action::REST docs.
Basically, it implements proper REST semantics, and then adds a bunch of
hacks to get around the fact that browsers suck ;)
The nice thing about the hacks is that they're mostly transparent when you
write your own controller code, so you can just pretend that every request
came from a properly RESTful client. In my experience, this makes for
_much_ cleaner controller code, even if you never actually add support for
any client besides browsers.
I should blog about this some time.
-dave
/*============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================*/
More information about the Catalyst
mailing list