質問編集履歴
2
エラーメッセージと省略したソースに整合性がないため、アップしたソースで得たエラーメッセージと差し替えました。すみません。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,9 +22,9 @@
|
|
22
22
|
|
23
23
|
エラーメッセージ
|
24
24
|
|
25
|
-
c:\>curl -XPOST https://script.google.com/macros/s/
|
25
|
+
c:\>curl -XPOST https://script.google.com/macros/s/AKfycbzntxDdti4eyHkSSLFGg6X6VfG9eSt7wgWwTK7kZldVp5SJebT7/exec -H "Accept: application/json" -H "Content-type: application/json" -d '{"value":"lisz-works"}'
|
26
26
|
|
27
|
-
<!DOCTYPE html><html><head><link rel="shortcut icon" href="//ssl.gstatic.com/docs/script/images/favicon.ico"><title>エラー</title><style type="text/css">body {background-color: #fff; margin: 0; padding: 0;}.errorMessage {font-family: Arial,sans-serif; font-size: 12pt; font-weight: bold; line-height: 150%; padding-top: 25px;}</style></head><body style="margin:20px"><div><img alt="Google Apps Script" src="//ssl.gstatic.com/docs/script/images/logo.png"></div><div style="text-align:center;font-family:monospace;margin:50px auto 0;max-width:600px">SyntaxError: Unexpected token: '(行
|
27
|
+
<!DOCTYPE html><html><head><link rel="shortcut icon" href="//ssl.gstatic.com/docs/script/images/favicon.ico"><title>エラー</title><style type="text/css">body {background-color: #fff; margin: 0; padding: 0;}.errorMessage {font-family: Arial,sans-serif; font-size: 12pt; font-weight: bold; line-height: 150%; padding-top: 25px;}</style></head><body style="margin:20px"><div><img alt="Google Apps Script" src="//ssl.gstatic.com/docs/script/images/logo.png"></div><div style="text-align:center;font-family:monospace;margin:50px auto 0;max-width:600px">SyntaxError: Unexpected token: '(行 4、ファイル「コード」、プロジェクト「postのテスト」)</div></body></html>
|
28
28
|
|
29
29
|
|
30
30
|
|
1
全く同じ文書が重複して書かれたためその部分を削除とさせて頂きました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,34 +31,6 @@
|
|
31
31
|
```
|
32
32
|
|
33
33
|
|
34
|
-
|
35
|
-
### 該当のソースコード
|
36
|
-
|
37
|
-
Google Apps Script
|
38
|
-
|
39
|
-
```ここに言語名を入力
|
40
|
-
|
41
|
-
function doPost(e){
|
42
|
-
|
43
|
-
FileLogger.logging(function(){ // logファイル出力callback
|
44
|
-
|
45
|
-
var jsonString = e.postData.getDataAsString();//← ""がない文字列となってしまう。
|
46
|
-
|
47
|
-
var params = JSON.parse(jsonString);//←書式異常でエラーとなる。
|
48
|
-
|
49
|
-
var value = params.value;
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
Logger.log(jsonString);
|
54
|
-
|
55
|
-
Logger.log(value);
|
56
|
-
|
57
|
-
});
|
58
|
-
|
59
|
-
}
|
60
|
-
|
61
|
-
```
|
62
34
|
|
63
35
|
### Google Apps Script(該当のソースコード)
|
64
36
|
|