[Catalyst] General API question: REST + SOAP

Bill Moseley moseley at hank.org
Wed Apr 6 20:20:51 GMT 2011

On Wed, Apr 6, 2011 at 9:44 AM, Trevor Leffler <tleffler at uw.edu> wrote:

> Hi, I've also seen the use of HTTP request headers for specifying service
> API minor versions (and other bits).  In particular, EBay comes to mind;
> they use v1, v2 in the end-point plus an X-EBAY-SOA-SERVICE-VERSION heade=

I thought about doing that.  Not sure where I'd hook in to the Catalyst
request -- I guess before prepare_action modify the path to insert the
version so that the correct version of controllers are used.

That approach might also make it easier to fall back -- if no v2 controller
exists then fallback to a previous version.   That way only need to create
new controllers for the methods that actually changed.   Hopefully, we are
not making new versions very often.

On a side note, we came across this issue with Firefox and X- headers over
the last few weeks:


A customer was complaining of seemingly random failures and by logging
request headers we could see that the requests that failed were missing all
the X- headers. And for these requests the X- headers was necessary.  (The
load balancer was depending on the header to route the request to the
correct web server.)

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110406/27c21=

More information about the Catalyst mailing list