Remove duplicated code between HttpIO and ChunkedIO
The following discussion from gitlab-ce!18169 should be addressed:
- [ ] @dosuken123 started a [discussion](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18169#note_66607332):
> We're gonna end up with a lot of duplication with `HttpIO`. Can we consider using https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18153 as it can easily adopt `HttpIO`?
issue