我正在使用node.js和Puppeteer从无头浏览器运行一个抓取项目。我想将数据发布到Google Apps脚本进行进一步处理。我希望在GAS项目中看到带有填充参数的数据。但是,我得到的结果只有空参数。
https://script.googleusercontent.com/macros/echo?user_content_key=[key]{“ parameter”:{},“ contextPath”:“”,“ contentLength”:-1,“ queryString”:“”,“ parameters”:{}}
这是生成该响应的GAS代码。
代码function doGet(e){
return handleResponse(e);
}
function doPost(e){
return handleResponse(e);
}
function handleResponse(e) {
var json = JSON.stringify(e)
var textOutput = ContentService.createTextOutput(json);
return textOutput
}
这是我用来发送请求的代码。
scraper.jsconst request = require('request');
request({
method: POST,preambleCRLF: true,postambleCRLF: true,uri: postUrl,multipart: {
chunked: false,data,},
我已使用[RequestBin] [1]验证我正在发送有效的POST请求。
我在做什么错了?