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

FEAT: parameterised headers rest_api_source #1

Closed

Conversation

ArneDePeuter
Copy link
Owner

Description

This pull request addresses the feature request discussed in issue dlt-hub#2071. It introduces dynamic parameter resolution for headers, allowing both keys and values to be resolved dynamically.

Key Features

  • Dynamic Header Resolution: Supports resolving both header keys and values at runtime using specified parameters.
  • Header params can also be bound to provided params
  • You can still define headers in the client, these will always be used. Endpoint specific parameters extend this dict.

Usage

The feature is demonstrated with the following example:
{ "name": "chicken", "endpoint": { "path": "chicken", "headers": {"{token}": "{token}", "num": "2"}, "params": { "token": { "type": "resolve", "field": "token", "resource": "authenticate", }, }, }, }

Tests

Comprehensive tests have been added to validate the implementation and ensure its correctness.

@ArneDePeuter
Copy link
Owner Author

ArneDePeuter commented Nov 21, 2024

Oops mistake, here is the right one: dlt-hub#2084

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.

1 participant