def exec_api_download(json_req, download_path)
      begin
        req = sign_request(json_req)
        File.open(download_path, "w") do |io|
          return HttpChannel.new(api_uri).execute_download(req) { |d| io << d; d.length }
        end
      rescue Curl::Err::CurlError => ex
        return JsonResponse.new("fail", ex.message)
      end
    end
def exec_api_download(json_req, download_path)
      begin
        req = sign_request(json_req)
        File.open(download_path, "w") do |io|
          return HttpChannel.new(api_uri).execute_download(req) { |d| io << d; d.length }
        end
      rescue Curl::Err::CurlError => ex
        return JsonResponse.new("fail", ex.message)
      end
    end
Execute the given API download request

 @param [JsonRequest] json_req     Request to download a file
 @param [String] download_path     Absolute filename to download requested file to
 @return [JsonResponse]