質問するログイン新規登録

回答編集履歴

1

ミスを見つけたので修正

2020/06/29 07:31

投稿

draq
draq

スコア2577

answer CHANGED
@@ -30,11 +30,11 @@
30
30
 
31
31
  const url = `https://docs.google.com/document/d/${documentId}/export?${parameters}`;
32
32
  const response = UrlFetchApp.fetch(url, {
33
- headers: {
33
+ "headers": {
34
34
  Authorization: `Bearer ${ScriptApp.getOAuthToken()}`,
35
35
  },
36
- method: "GET",
36
+ "method": "GET",
37
- contentType: "application/pdf",
37
+ "Content-Type": "application/pdf",
38
38
  });
39
39
 
40
40
  const blob = response.getBlob().setName(filenameWithoutExtension + ".pdf");