Update rest.js

This change adds support for multipart/form-data content type.
it's needed for sending statuses/update_with_media requests.