gas:example:http_client
文書の過去の版を表示しています。
function httpget() { const url = 'https://jsonplaceholder.typicode.com/posts/1'; const response = UrlFetchApp.fetch(url); if (response.getResponseCode() === 200) { const data = JSON.parse(response.getContentText()); Logger.log(data.title); } else { Logger.log('GET request failed. Status code: ' + response.getResponseCode()); } }
gas/example/http_client.1692773584.txt.gz · 最終更新: 2023/08/23 15:53 by mikoto