Add on_request callback