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

support templating for http sinks #44

Open
haveiss opened this issue Nov 20, 2023 · 0 comments
Open

support templating for http sinks #44

haveiss opened this issue Nov 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@haveiss
Copy link
Collaborator

haveiss commented Nov 20, 2023

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants