Question

I was wondering if it is possible to match on PATCH requests in Happstack besides the fact that the Method datatype has no constructor for PATCH:

data Method
= GET | HEAD | POST | PUT | DELETE | TRACE | OPTIONS | CONNECT

However, there are situations when the need for a PATCH request might arise, for example it can be handy when using Backbone.js. It would be nice to know, if it's possible to match on different Methods than the defined ones without modifying Happstack. Also I'd like to know if there's a particular reason that the PATCH request is not supported in Happstack.

Was it helpful?

Solution

This question was showing up in the unanswered list, so let me just fill in from the comments:

Unfortunately, the current version of Happstack does not support extension methods. That is clearly just wrong. It is fixed in the upcoming HTTP backend, but that is still a ways off. I am not opposed to fixing it in Happstack 7 if it helps you. – stepcut May 31 at 15:40

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top