request and response hooks added support for subdirectory methods