attempt to create a generic Http mock on browser side