test: improve coverage of lib/_http_client.js
And also refactor the callback style code to Promise based.
Refs: https://coverage.nodejs.org/coverage-f37c26b8a2e10d0a/lib/_http_client.js.html#L200 https://coverage.nodejs.org/coverage-f37c26b8a2e10d0a/lib/_http_client.js.html#L319