Last active
August 9, 2020 01:34
-
-
Save ahmedsakr/f9e42b56005603ded899423e1c78fbb9 to your computer and use it in GitHub Desktop.
Handler for requesting a fortune
This file contains hidden or 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 function requestFortune() { | |
fetch('https://a9vymko126.execute-api.ca-central-1.amazonaws.com/test', { method: "GET" }) | |
.then(response => response.json()) | |
.then(data => document.getElementById('fortune-text').innerHTML = data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment