Skip to content

Instantly share code, notes, and snippets.

View WhiteX's full-sized avatar
🎯
Focusing

Arpad Szucs WhiteX

🎯
Focusing
View GitHub Profile
@WhiteX
WhiteX / PostData.js
Created April 7, 2022 18:14 — forked from dtoki/PostData.js
Sending data to a web hook using javascript XMLHttpRequest #clientside
function postDataToWebhook(data){
//get the values needed from the passed in json object
var userName=data.name;
var userPlatform=data.platform;
var userEmail=data.email;
//url to your webhook
var webHookUrl="webhook_url";
//https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
var oReq = new XMLHttpRequest();