Add params_from_request function