是否有任何Javascript API允许我直接通过axios发布或通过Node JS将发布请求发送到Elastic Search?这是将日志发送到Elastic Search。
答案 0 :(得分:0)
您可以使用fetch
发送POST请求。
const response = await fetch(url, {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data) // body data type must match "Content-Type" header
});