okteto.js 332 B

12345678910111213141516
  1. function okteto() {
  2. fetch("/okteto", {
  3. method: "POST",
  4. credentials: "include",
  5. body: window.location.href
  6. })
  7. .then(response => response.text())
  8. .then((response) => {
  9. if(response == "WAIT") {
  10. setTimeout(() => {okteto();}, 5000);
  11. }
  12. })
  13. }
  14. okteto()