Fix cURL code for Github requests.

Adds correct content-type header. Fixes error handling. Re-enables SSL
verify-peer.