HTTPGateway: Fixing #2229

This is RE: #2229 

I've tested it, but of course, I would appreciate if you could too, since there are a lot of use cases for this class.

Since the issue was assign to milestone 2.6.0, I've made things `@deprecated` on that version.