Update to new API with httpclient 4.3.x dependency.

Merged with upstream and removed .idea.