Use the API so that requests are authenticated

Requests to get a gist from GHE were failing because they were just URL requests. This changes the behavior to use the API to retrieve the content of the gist.