Fix certificate validation error
Allow user to specify their own http client.

Fixes #3
go fmt