[rest] Adds implementation for downloading files.