const got = require('got') const log = require('pino')() async function sendPingbackToEndpoint(endpoint, source, target) { const body = ` pingback.ping ${source} ${target} ` await got.post(endpoint, { contentType: "text/xml", body, retry: { limit: 5, methods: ["POST"] } }) log.info(` OK: pingback@${endpoint}, sent: source ${source}, target ${target}`) } module.exports = { sendPingbackToEndpoint }