I am trying to pass a variable that is derived from a database (and keeps changing) to a fetch URL.
(我试图将派生自数据库的变量(并不断更改)传递给获取URL。)
I don't want to hard code it in the URL. (我不想在URL中对其进行硬编码。)
How do I go about it? (我该怎么办?)
Here is the snippet of the code. (这是代码片段。)
};
var searchString = amount;
var payload = JSON.stringify(data);
var options = {
'method': 'POST',
'Content-Type': 'application/json',
'payload' : data,
};
var url = 'https://......./**amount**/budget_items?token';
var response = UrlFetchApp.fetch(url, options);
I want to pass the search string variable but I don't know-how.
(我想传递搜索字符串变量,但我不知道如何做。)
Any help? (有什么帮助吗?)
ask by levi translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…