Adding explicit JSON media type to HTTP request header

Some services (such as GitHub) respond to certain requests using the application/x-www-form-urlencoded media type, which causes an assertion failure as the library expects the response data to be of the JSON media type and cannot therefore deserialise the data.