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

Web Dev, Nottingham, UK
This entry was posted in WordPress and tagged GitHub API, PHP. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">