Created
January 3, 2022 21:54
-
-
Save enesakar/8561ec8cd90ded7344e99aafc18223ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function handler(req, res) { | |
fetch("https://full-mantis-14289-us1-rest-kafka.upstash.io/produce/newtopic/MESSAGE", { | |
headers: { | |
Authorization: "Basic Wm5Wc2JDMXRZVzUwYVhNdE1UUXlPVDlUR2szT0ZkabXRvYWxYbm9ldTlUalFG5qZlNLd1X3lBcTRUUEdkOWM2SmJxZlE9PQ==" | |
} | |
}).then(response => response.json()) | |
.then(data => { | |
console.log(data) | |
}); | |
res.status(200).json({ name: 'John Doe' }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment