Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var requestOptions = {
- method: 'GET',
- redirect: 'follow'
- };
- function apiCall() {
- fetch("https://api.adviceslip.com/advice", requestOptions)
- .then(response => response.text())
- .then(result => console.log(result))
- .catch(error => console.log('error', error));
- }
- apiCall();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement