Refactoring of HTTP Get callback