Check out example codes for "script to download a file to google drive". It will help you in understanding the concepts better.

Code Example 1

function saveFile() {
  var url = "http://www.ferc.gov/docs-filing/eqr/soft-tools/sample-csv/contract.txt";
  var blob = UrlFetchApp.fetch(url).getBlob();
  DriveApp.createFile(blob);
}

Learn ReactJs, React Native from akashmittal.com