extract function template parse_request