docstring for add middleware
read method from wsgi env in case request class doesn't have a method attribute