Skip to content

Instantly share code, notes, and snippets.

@burrussmp
Created July 11, 2020 03:16
Show Gist options
  • Save burrussmp/99bbe24bcb9e76ac949489c0d8c8d10e to your computer and use it in GitHub Desktop.
Save burrussmp/99bbe24bcb9e76ac949489c0d8c8d10e to your computer and use it in GitHub Desktop.
Javascript Ajax Call to Get Data in Observable
response = {
while(1){
let response = await $.ajax({
url: `${server_url}/data`,
contentType: 'application/json',
type: 'GET'
});
yield Promises.delay(6000, response);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment