diff --git a/quickstart/autokitteh.yaml b/quickstart/autokitteh.yaml index 7ce48406..e2de412e 100644 --- a/quickstart/autokitteh.yaml +++ b/quickstart/autokitteh.yaml @@ -15,9 +15,3 @@ project: data: path: trigger_path call: program.py:on_http_get - - name: http_get_with_param - connection: http_conn - event_type: get - data: - path: iterations/{iters} - call: program.py:on_http_get diff --git a/quickstart/program.py b/quickstart/program.py index 696a3a7d..ed1dc487 100644 --- a/quickstart/program.py +++ b/quickstart/program.py @@ -9,9 +9,9 @@ def on_http_get(event): print(f"Received {event.data.method} request") - iterations = int(event.data.params.get("iters", "0")) + iterations = int(event.data.url.query.get("iterations", "0")) for i in range(iterations): - print("Loop iteration: %d of %d" % (i + 1, iterations)) + print(f"Loop iteration: {i + 1} of {iterations}") time.sleep(FIVE_SECONDS) print(f"Finished processing {event.data.method} request")