API improvements around HTTP client.