Set 'Content-Type: application/json' [Fixes #7]
Set 'Content-Type: application/json' [Fixes #7]

The issue was that Net::HTTP sets the default content-type to
application/x-www-form-encoded, which caused GitHub's servers to
percent-decode the incoming content.

This meant that if a file contained a % that was not followed by two hex
digits, you could not upload a gist. Setting the right content-type
header fixes this.

Thanks to @rking for the data to replicate this problem.

ConradIrwin/gist,roxyboy/gist,ryanbradynd05/gist,ConradIrwin/gist,dLobatog/gist,zmwangx/gist,bchase/gist,retrography/gist,mofodox/gist,roxyboy/jist,defunkt/gist,eLobato/gist,ConradIrwin/jist