Skip to content

[Feature] Add http trigger #4

Open
@djmgit

Description

@djmgit

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.

Metadata

Metadata

Assignees

Labels

featureProposal for a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions