Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should accept any library, axios, fetch, node-fetch, requestPromise #1

Open
MichaelDimmitt opened this issue Sep 9, 2019 · 1 comment

Comments

@MichaelDimmitt
Copy link
Member

data = (localStorage.url === url) ? localStorage[data] : networkRequest(params)
@MichaelDimmitt
Copy link
Member Author

MichaelDimmitt commented Sep 9, 2019

function networkRequest(){
  fetch('https://httpbin.org')
  .then(response => { return response.text(); })
  .then(response => { console.log('Get', 'fetch', JSON.stringify(response)) })
  .catch(error => { console.log('Get', 'fetch', {error}) })
}
// this does not call the fetch function. fetch is triggered when networkRequest is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant