downloadFile

external fun downloadFile(query: APIQueryParams, target: String): Promise<Unit>

Download a file to target. Throws when the response status is not 200.