Mojang has disabled their legacy skins API:
https://twitter.com/MojangSupport/status/964511258601865216
With their API rate limits, it's now practially impossible
for us to support usernames.
Fixes#142. The default parameter allows using:
- UUID
- URL
- MHF_Alex
- MHF_Steve
- Alex
- Steve
Contrary to UUIDs, using alex/steve doesn't redirect
and instead provides the skin from a locally stored file.
results in:
1) less duplicated code
2) default response headers being used at all times
3) *all* requests being logged properly
- adds documentation for result.code
- allows using result.code to override HTTP 500
- uses response.js for too-busy, server error, method not allowed
from MDN:
JavaScript does not protect the property name hasOwnProperty; thus, if the possibility exists that an object might have a property with this name, it is necessary to use an external hasOwnProperty to get correct results
human_status (response.js) defines code -2 as 'user error'. 404 is definitely a user error, so using that makes sense.
eventually we should change the whole status code thing with #120