Gist Page Improvements

I noted my Gists page had gone a bit wonky last week which I assumed (wrongly) to be a caching issue. Turns out GitHub now need a User Agent passed with any request to the API, in their words “Requests with no User Agent string will be rejected. If you are hitting the API without authentication, we ask that you add some kind of identification to the UA header value. This is so we can contact you if there are problems.” (source) – I guess this makes sense from their perspective.

I’ve added the user agent in the curl request and also altered my html to be more compact for better scan-ability and updated the gist with these changes.

About Ingmar Boddington

Codemonkey, Sheffield, UK
This entry was posted in WordPress and tagged GitHub API, PHP. Bookmark the permalink.