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

Connectors shouldn't need both HttpClient and uriPrefix #2780

Open
MikeStall opened this issue Dec 17, 2024 · 1 comment · May be fixed by #2785
Open

Connectors shouldn't need both HttpClient and uriPrefix #2780

MikeStall opened this issue Dec 17, 2024 · 1 comment · May be fixed by #2785
Assignees
Labels
Breaking API Connectors Issues related to connectors.

Comments

@MikeStall
Copy link
Contributor

MikeStall commented Dec 17, 2024

HttpClient already provides the base address. So we shouldn't also need uriPrefix (which is conceptually just part of the base address).

An additional benefit is that this lets the host fully control the endpoint.

  • They can pick v1 vs. v2, (will this also lets us revert Make ZenDesk use v2 #2718 and instead defer that responsibility to the host?)
  • They can call CDP hosted outside of APIM. (this includes localhost)
@MikeStall MikeStall added the Connectors Issues related to connectors. label Dec 17, 2024
@MikeStall
Copy link
Contributor Author

This will also flush out other concerns. We extract a connectorName from the uri:

string connectorName = (parts.Length > 1) ? parts[1] : string.Empty;

we should avoid this because:

  • Fx.Connectors (client code) shouldn't be having per-connector logic. CDP is supposed to be a standard interface.
  • we can't always assume the uri implies the connector type.

Worst case - we could still get this information from httpClient.baseAddress.

@LucGenetier LucGenetier linked a pull request Dec 18, 2024 that will close this issue
@LucGenetier LucGenetier linked a pull request Dec 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking API Connectors Issues related to connectors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants