Skip to content

Conversation

@shgogna
Copy link
Contributor

@shgogna shgogna commented May 15, 2025

This PR introduces a new version of PowerPlatformConnectorClient called PowerPlatformConnectorClient2. Naming for the new client is open for debate 😄

The differences include:

  • An interface for testing/mocking: IPowerPlatformConnectorClient2
  • A delegate for providing the bearer token: PowerPlatformConnectorClient2BearerTokenProvider
  • POCO for diagnostic values: PowerPlatformConnectorClient2DiagnosticOptions which specifies values that are typically sent by clients
  • Connector client takes specific parameters for method, operationPathAndQuery, headers, and content instead of reusing HttpRequestMessage. This was done to avoid client teams creating a dummy object that would not even get used.
  • Connector client takes the full base URL (also known internally as the "primaryRuntimeUrl")
  • Added GetFirstServerUri extension to OpenApiExtensions

Misc:

  • Remove trailing whitespace from OpenApiExtensions

See: #2908

@shgogna shgogna requested a review from a team as a code owner May 15, 2025 06:07
Task<HttpResponseMessage> SendAsync(
HttpRequestMessage requestMessage,
PowerPlatformConnectorClient2DiagnosticOptions diagnosticOptions,
CancellationToken cancellationToken);
Copy link
Contributor

@MikeStall MikeStall May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a public SDK, the interface should be minimal.
Can this method be an extension method that calls into the other "true" one?

That also makes it very clear how they relate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this to an extension method

@jas-valgotar jas-valgotar force-pushed the shgogna/powerplatformconnectorsclientv2 branch from 96e3497 to 20fce4a Compare July 8, 2025 22:57
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.

3 participants