Skip to content

Instantly share code, notes, and snippets.

@ctkqiang
Created January 15, 2022 19:51
Show Gist options
  • Save ctkqiang/4cc0db9a25f5709b2c9e5382b064e906 to your computer and use it in GitHub Desktop.
Save ctkqiang/4cc0db9a25f5709b2c9e5382b064e906 to your computer and use it in GitHub Desktop.
log(msg) {
let webhook_url = 'thewebhoooklink';
let params = {
username: 'ABC',
content: msg,
};
return axios({
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: JSON.stringify(params),
url: webhook_url,
});
}
@ctkqiang
Copy link
Author

curl -H "Content-Type: application/json" -X POST -d '{"content":"'"YOUR WHAT EVER MESSAGE "'"}' $url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment