Also added a helper function for chunked media upload, restful/media-upload-chunked, which is the recommended way of adding images, videos, and gifs to a tweet.
Added request/guess-mime-type, which is more useful now that more media is supported.
Fixed handlers/response-return-everything to not break when a twitter API call does not return a body (which happens in the case of media/upload).
Added a test for media upload, with a new test file containing an animated gif.
Resolves issue #66.
Also added a helper function for chunked media upload, restful/media-upload-chunked, which is the recommended way of adding images, videos, and gifs to a tweet.
Added request/guess-mime-type, which is more useful now that more media is supported.
Fixed handlers/response-return-everything to not break when a twitter API call does not return a body (which happens in the case of media/upload).
Added a test for media upload, with a new test file containing an animated gif.
The animated gif is about 34K, and is in the public domain. It was obtained from https://commons.wikimedia.org/wiki/File:Asteroide_Eros_vu_par_sonde_Near_a_7000_km.gif, which says "This file is in the public domain in the United States because it was solely created by NASA".