Skip to content

Conversation

@aparajit-pratap
Copy link
Contributor

Purpose

This adds a new constructor to initialize GregClient with a custom HTTP client to be used for no-network mode in Dynamo. See Dynamo PR DynamoDS/Dynamo#16238.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@aparajit-pratap aparajit-pratap requested review from avidit and Copilot May 22, 2025 13:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new GregClient constructor overload that accepts a custom HttpClient, enabling no-network mode in Dynamo and applying conditional TLS settings for older Windows versions.

  • Imported System.Net.Http and added an overload to inject a custom HttpClient.
  • Integrated optional HttpClient into RestClient initialization with duplicated TLS setup logic.
  • Retained fallback to the existing RestClient constructor when no HttpClient is provided.
Comments suppressed due to low confidence (1)

src/GregClient/GregClient.cs:35

  • The new constructor path with a custom HttpClient isn't covered by existing tests; consider adding unit tests to verify initialization in no-network mode.
public GregClient(IAuthProvider provider, string packageManagerUrl, HttpClient httpClient)

aparajit-pratap and others added 2 commits May 22, 2025 09:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@aparajit-pratap aparajit-pratap merged commit 6e42116 into master May 27, 2025
12 checks passed
@aparajit-pratap aparajit-pratap deleted the pratapa/dyn-6409 branch May 27, 2025 15:07
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