Skip to content

Commit

Permalink
Don't limit trigger to GET requests
Browse files Browse the repository at this point in the history
  • Loading branch information
daabr committed Aug 21, 2024
1 parent d63d8a3 commit 04b5370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions quickstart/autokitteh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ project:
triggers:
- name: http_get
connection: http_conn
event_type: get
data:
path: trigger_path
call: program.py:on_http_get
call: program.py:on_http_request
4 changes: 2 additions & 2 deletions quickstart/program.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Basic handler for incoming HTTP GET requests."""
"""Basic handler for incoming HTTP requests."""

import time


FIVE_SECONDS = 5


def on_http_get(event):
def on_http_request(event):
print(f"Received {event.data.method} request")

iterations = int(event.data.url.query.get("iterations", "0"))
Expand Down

0 comments on commit 04b5370

Please sign in to comment.