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

[Feature] Add http trigger #4

Open
djmgit opened this issue Dec 4, 2019 · 4 comments
Open

[Feature] Add http trigger #4

djmgit opened this issue Dec 4, 2019 · 4 comments
Assignees
Labels
feature Proposal for a new feature

Comments

@djmgit
Copy link
Collaborator

djmgit commented Dec 4, 2019

Similar to like TCPTrigger we should also have a http trigger, which can make a http (GET/POST)
request to a given endpoint and expect a desired response or response code.

If the response or response code does not match or match (as given) expected response or response code, we can fire the trigger.

A sample trigger template might look like this:

trigger:
      type: HTTP_TRIGGER
      requesttype: "GET"
      headers:
      - header1: value
      - header2: value
      check: http_fail
      host: 127.0.0.1
      port: 8899
      path: /web/health
      response: "OK"
      responsecode: 200
      attempts: 3
      threshold: 1
    execute:
    - "some action"

check can be on of http_fail, http_pass, either of response or response code can be checked
or both as given. Request type can be on of the http request types.

For the start, we can create the trigger which checks only http get and compares it with a given response code or response. We can then build on top of it.

@djmgit djmgit added the feature Proposal for a new feature label Dec 6, 2019
@realsdx
Copy link

realsdx commented Dec 31, 2019

I would like to work on this issue.

@djmgit
Copy link
Collaborator Author

djmgit commented Dec 31, 2019

@realsdx great 👍

@Mis2
Copy link

Mis2 commented Aug 5, 2020

I would like to work on this issue if no one is working on it presently.

@djmgit
Copy link
Collaborator Author

djmgit commented Aug 5, 2020

@Mis2 Since there has been no activity on this issue for a long time, I am assigning this issue to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Proposal for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants