Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to match on PATCH requests in Happstack?

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.

like image 882
Jakob Runge Avatar asked Nov 12 '22 04:11

Jakob Runge


1 Answers

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

like image 59
Kevin Reid Avatar answered Nov 15 '22 07:11

Kevin Reid