我正在尝试使用javascript发出POST请求,但是URL的双斜杠被视为注释行的开头。
....
function queryCoreReportingApi(profileId) {
POST https://analyticsreporting.googleapis.com/v4/reports:batchGet
....
最佳答案
将url放在引号中是一个字符串,并且需要JS引号将其识别为:
"https://analyticsreporting.googleapis.com/v4/reports:batchGet"