durusmail: quixote-users: Suggestion for addition to http_request.py
Suggestion for addition to http_request.py
Suggestion for addition to http_request.py
Etienne Posthumus
2003-08-01
In the quest to make my applications more RESTful, I often do:
    m = request.get_header('REQUEST_METHOD')
    if m == "GET":
in each request.

It would be nice if http_request.py has this tiny addition in HTTPRequest:

    def get_method (self):
        """Returns the HTTP method for this request
        """
        return self.environ.get('REQUEST_METHOD', 'GET')

Any comments?

Etienne Posthumus
Programmer, IIDS - Intelligent Interactive Distributed Systems
http://www.iids.org/
Vrije Universiteit Amsterdam
----------------------------

reply