Webhooks Tutorial with Discord and Vanilla Javascript (fetch api)
63.8 هزار بار بازدید -
5 سال پیش
-
Webhooks are custom callbacks URLs
Webhooks are custom callbacks URLs that an application can call to communicate with another application. A popular uses of webhooks are github and discord. Where discord creates a webhook and you can share that webhook for other applications to “hook” into it to post messages discord when something happened in the application. When I upload a video post a link to discord
In this video, Ill demonstrate webhooks with vanilla Javascript fetch api and discord webhooks. We will execute a fetch api call from the browser,
0:00 Intro
1:10 Webhooks Explained
5:20 Example
const whurl ="https://discordapp.com/api/webhooks/6..."
const msg = {
"content": "Hello! I'm a bot, this is fetch api"
}
fetch(whurl + "?wait=true",
{"method":"POST",
"headers": {"content-type": "application/json"},
"body": JSON.stringify(msg)})
.then(a=xa.json()).then(console.log)
replacex with greater than
Discord API
https://discordapp.com/developers/doc...
Discord Server Link Discord: discord
🏭 Software Architecture Videos
Software Architecture
💾 Database Engineering Videos
Database Engineering
🛰 Network Engineering Videos
Network Engineering
🏰 Load Balancing and Proxies Videos
Proxies
🐘 Postgres Videos
PostgresSQL
🚢Docker
Docker
🧮 Programming Pattern Videos
Programming Patterns
🛡 Web Security Videos
Web Security
🦠 HTTP Videos
HTTP
🐍 Python Videos
Python by Example
🔆 Javascript Videos
Javascript by Example
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
Patreon: hnasr
Stay Awesome,
Hussein
In this video, Ill demonstrate webhooks with vanilla Javascript fetch api and discord webhooks. We will execute a fetch api call from the browser,
0:00 Intro
1:10 Webhooks Explained
5:20 Example
const whurl ="https://discordapp.com/api/webhooks/6..."
const msg = {
"content": "Hello! I'm a bot, this is fetch api"
}
fetch(whurl + "?wait=true",
{"method":"POST",
"headers": {"content-type": "application/json"},
"body": JSON.stringify(msg)})
.then(a=xa.json()).then(console.log)
replacex with greater than
Discord API
https://discordapp.com/developers/doc...
Discord Server Link Discord: discord
🏭 Software Architecture Videos
Software Architecture
💾 Database Engineering Videos
Database Engineering
🛰 Network Engineering Videos
Network Engineering
🏰 Load Balancing and Proxies Videos
Proxies
🐘 Postgres Videos
PostgresSQL
🚢Docker
Docker
🧮 Programming Pattern Videos
Programming Patterns
🛡 Web Security Videos
Web Security
🦠 HTTP Videos
HTTP
🐍 Python Videos
Python by Example
🔆 Javascript Videos
Javascript by Example
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
Patreon: hnasr
Stay Awesome,
Hussein
5 سال پیش
در تاریخ 1398/09/23 منتشر شده
است.
63,852
بـار بازدید شده