mozilla-services/cornice — pull request #46 by lorenzogil (2012-03-31 17:47:56+00:00)
Title: Add support for the OPTIONS HTTP verb

My application needs CORS support and that means I need to have an OPTIONS verb. I think this is pretty common in today REST services so I guess is worthy to add it to Cornice.

Prior to Cornice 0.7 I used to have a Service sublcass like this:

```python
class CORSService(Service):

def options(self, **kw):
return self.api(request_method='OPTIONS', **kw)
```

but starting with Cornice 0.7 I switched to the nicer resource class based API. Unfortunately you can not use custom Service classes with resources. I started adding support for that and then I thought that just adding the options convenience method to the Service class was much simpler and cleaner.

What do you think?