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 adapters #210

Closed
kjellmorten opened this issue Mar 13, 2023 · 0 comments
Closed

Support adapters #210

kjellmorten opened this issue Mar 13, 2023 · 0 comments

Comments

@kjellmorten
Copy link
Collaborator

The old "adapter" should be reintroduced, but this time without the transporter aspect. E.g. a JSON adapter should transform payload and response data from and to the service, but may be paired with any transporter. Also, a service may have several adapters, when that makes sense, and also be applied on specific endpoints.

Configuration:

{
  "id": "example",
  "transporter": "http",
  "adapters": ["json", "rest"],
  "endpoints": [
    {
      "match": { "type": "GET" }
    },
    {
      "match": { "type": "SET" },
      "adapters": ["checksumHeader"]
    }
  ]
}

The available adapters should be provided to Integreat.create() in the same way transporters are.

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

No branches or pull requests

1 participant