move function related to http requirement to model package