Skip to content

support templating for http sinks #44

@haveiss

Description

@haveiss

Is your feature request related to a problem? Please describe.
The current implementation of HTTP sinks lacks the flexibility to dynamically configure URLs and payloads, making it challenging to seamlessly integrate with existing APIs without establishing a rigid contract with Meteor. For example patching existing resource in guardian.

Describe the solution you'd like
I propose introducing templating support for both the URL and payload in HTTP sinks. This enhancement would empower users to dynamically configure endpoints and customize payloads based on specific requirements.

sinks:
  name: http
  config:
    method: PATCH
    success_code: 200
    url: https://example.com/v1beta1/{{.Urn}}
    headers:
      some-header: some-value
    script:
      engine: tengo
      source: |
        // global variable asset
        payload := {
          // do transformation here
          key1: asset.urn,
          ...
        }
        sink(payload)

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions