Add redirect helper on python ServerSentEventGenerator (#836)
This commit is contained in:
parent
a4145207f0
commit
a705eb7044
|
@ -161,3 +161,7 @@ class ServerSentEventGenerator:
|
|||
event_id,
|
||||
retry_duration,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def redirect(cls, location: str):
|
||||
return cls.execute_script(f"setTimeout(() => window.location = '{location}')")
|
||||
|
|
Loading…
Reference in New Issue