Update postrequest.js

This commit is contained in:
michel_929 2024-11-10 14:06:35 +01:00
parent 2a295dfe32
commit 018b57e880

View file

@ -4,12 +4,15 @@ const axios = require("axios");
class PostRequest extends NotificationProvider { class PostRequest extends NotificationProvider {
name = "PostRequest"; name = "PostRequest";
/**
* @inheritdoc
*/
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
const okMsg = "Sent Successfully."; const okMsg = "Sent Successfully.";
const url = notification.postrequestURL; const url = notification.postrequestURL;
try { try {
let config = { let config = {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"Authorization": "Bearer " + notification.postrequestToken, "Authorization": "Bearer " + notification.postrequestToken,