call on_rest_data with RESTRequest object