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

Question: How do I pick up the URL variables at the start of the app? #413

Open
thondeboer opened this issue May 8, 2024 · 2 comments
Open

Comments

@thondeboer
Copy link

I have an app that I want to be able to use URL variables, and I can figure out how to setup a handler when the values CHANGE, but how do I get the INITIAL settings of the URL values?
There is no equivalent state.get_route_vars() it seems so how do I get those values at startup?

@FabienArcellier
Copy link
Collaborator

Hi,

Did you try to use the session object with the http header referer ? You have access to the url at the origin of the call. You should be able to parse it with urlparse lib.

def handle_app_enter(state, session):
	print(session['headers'].get('referer'))

An event is missing to capture a user's entry into the application at the root level. You must necessarily use the one on the page wf-page-open.

We can imagine a wf-app-open event.

@thondeboer
Copy link
Author

thondeboer commented Jun 10, 2024 via email

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

2 participants