Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

Flask REST API and Live Feedback

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Matthew C.  O.P.
Date: Wed 20th May, 3:33pm
Actions: 
        Login-to-reply
I have fixed the function call, it seems setInterval and setTimeout both have trouble 
accepting parameters. You can get around this by using "Function.prototype.bind()". eg the 
last line of the pastebin is now:

setInterval(retrieveNewAttempts.bind(null, token), 5000)

However, I am still interested in what kind error handling needs to be done for ajax, and how 
to do it? Happy to be pointed in the right direction and not spoon-fed as I'm sure there is a 
bit to it.

In addition, I do not know when/how I should revoke a token from a user?

Sincerely,
Matthew Carter

Related articles

Flask REST API and Live Feedback (all 3) RSS
├─ original   Wed 20th May, 10:43am, Matthew C.
├─ THIS   Wed 20th May, 3:33pm, Matthew C.  O.P.
└─ reply 2   Thu 21st May, 11:24am, Timothy F.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020