Intercepting requests and responses using attributes