generated at
GASでfetchを使う
Google Apps Scriptでは、 fetch に相当するUrlFetchApp.fetch()を使う


GET する
js
const response = UrlFetchApp.fetch('https://...', { method: ..., headers: ..., payload: ..., });
全て同期処理で実行される
第2引数にoptionsを渡すところはFetch APIと同じ
bodyではなくpayloadなので注意
結果の受け取り
jsonで受け取る
JSON.parse(response.getContentText()) ;
エラーも response で受けたいときは、 muteHttpExceptions true にする

複数のfetchを同時に実行したいときはUrlFetchApp.fetchAll()を使う

Reference