1
我一直在试图使用webhook将Exporter.send方法导出到URL。出口已成功,因为他们已经收到我的电子邮件。但是,我在线使用webhook服务,即使将导出内容发送到我的电子邮件,也不会向URL注册任何ping。如何将Webhooks与Exporter.send方法一起使用?
下面是我使用的代码,基本上直接从文档中拉出。
dronedeployApi.Exporter.send({
layer: 'NDVI Toolbox',
email: emails,
file_format: 'geotiff',
merge: mergeCheckbox.checked ? true : false,
projection: projectionValue.value,
resolution: resolutionValue.value === 0 ? 'native' : resolutionValue.value,
webhook: {
url: 'http://webhook.site/3d10872c-a56e-4b2b-aa3b-b8c0334e8f5f'
}
})
.then(function(exportId) {
dronedeployApi.Messaging.showToast('NDVI export successful!', {
timeout: -1
});
},
function(error) {
dronedeployApi.Messaging.showToast(error, {
timeout: -1
});
}
);
关于可能出错的想法?谢谢!
感谢您的回应 - 我再次尝试,但不幸的是它不工作。我怎样才能私下联系? – singhcpt
此外,作为后续 - 我使用这个webhooks测试器来跟踪我的代码中的URL请求:[https://webhook.site/#/](https://webhook.site/#/)。我也尝试了RequestBin,它也没有工作。 – singhcpt
啊,我没有意识到,webhook.site是一个实际的网站,而不是你只是删除一个私人网址,你不想公开的时刻。 我会用webhook.site测试你的确切代码,看看我能想出什么。 – miketheprogrammer