http-provider block refactoring