added logic to match request based on the uri and method