Small refactoring for http storage