Skip to content

Webhook Trigger #592

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

Merged
merged 9 commits into from
Jun 19, 2024
Merged

Conversation

contagon
Copy link
Contributor

This PR closes #353 and adds a new webhook trigger defined as,

@webhook_trigger(webhook_id, str_expr=None, local_only=True, methods={"POST", "PUT"}, kwargs=None)
def foo(payload):
    pass

When looking into this, I was hoping that webhooks trigger events, but they unfortunately don't leading to this solution. I've been using this for about a week and it seems to be working stably. I've added a few things to the tests to make sure things at least run. I'm not sure how to actually call a webhook in a test, but happy to do it if there is a way.

I also added some documentation that hopefully covers everything.

Let me know if any changes or tweaks are needed!

@craigbarratt craigbarratt merged commit 6eab8c2 into custom-components:master Jun 19, 2024
@craigbarratt
Copy link
Member

Awesome - thanks for the PR. Sorry about the delay in following up.

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

Successfully merging this pull request may close these issues.

Feature Request: Webhook support
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy