Skip to content

Conversation

@maikebing
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 3, 2025 08:06
@maikebing maikebing requested a review from a team as a code owner December 3, 2025 08:06
@maikebing maikebing requested review from louis-z and removed request for a team December 3, 2025 08:06
Copy link

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 migrates the codebase from the legacy HttpWebRequest/WebResponse API to the modern HttpClient API. However, the migration contains several critical bugs that will prevent the code from functioning correctly.

Key Changes:

  • Updated GitLabRequestResult to use HttpRequestMessage and HttpResponseMessage instead of HttpWebRequest and WebResponse
  • Modified RequestOptions.GetRequestStream() to work with HttpRequestMessage using conditional compilation for different target frameworks
  • Added new constructor to WebHeadersDictionaryAdaptor for HttpResponseHeaders

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
NGitLab/RequestOptions.cs Updated GetRequestStream to use HttpRequestMessage with framework-specific stream reading
NGitLab/PublicAPI/net8.0/PublicAPI.Unshipped.txt Updated API signatures to reflect HttpClient types
NGitLab/NGitLab.csproj Added BOM marker to file
NGitLab/Impl/WebHeadersDictionaryAdaptor.cs Added constructor for HttpResponseHeaders (contains critical bugs)
NGitLab/Impl/HttpRequestor.cs Updated response handling to use HttpResponseMessage and changed header retrieval logic
NGitLab/Impl/HttpRequestor.GitLabRequest.cs Migrated from WebRequest.CreateHttp to HttpClient (contains multiple critical bugs)
NGitLab/GitLabRequestResult.cs Changed property types from HttpWebRequest/WebResponse to HttpRequestMessage/HttpResponseMessage
Comments suppressed due to low confidence (1)

NGitLab/Impl/HttpRequestor.GitLabRequest.cs:180

  • Write to static field from instance method, property, or constructor.
                _httpClient = new HttpClient(handler);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@louis-z louis-z requested review from Toa741 and removed request for louis-z December 4, 2025 12:50
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