Skip to content

Fspes 115#55

Merged
MatteoDelOmbra merged 7 commits into
mainfrom
FSPES-115
May 8, 2026
Merged

Fspes 115#55
MatteoDelOmbra merged 7 commits into
mainfrom
FSPES-115

Conversation

@MichalFrends1
Copy link
Copy Markdown
Contributor

@MichalFrends1 MichalFrends1 commented May 7, 2026

Please review my changes :)

Task Update PR template

Review Checklist

  • Task version updated (x.x.0)
  • CHANGELOG.md updated
  • Solution builds
  • Warnings resolved (if possible)
  • Typos resolved
  • Tests cover new code
  • Description how to run tests locally added to README.md (if needed)
  • All tests pass locally

Summary by CodeRabbit

  • New Features

    • HTTP requests now support full proxy configuration with customizable proxy URL, username, and password options.
  • Other Changes

    • HTTP client handling updated to integrate proxy settings into request execution and caching mechanisms.
    • Package version bumped to 1.11.0.

Copilot AI and others added 4 commits May 7, 2026 06:16
Agent-Logs-Url: https://github.com/FrendsPlatform/Frends.HTTP/sessions/a1252305-c656-43df-8134-1b178943ee96

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FrendsPlatform/Frends.HTTP/sessions/a1252305-c656-43df-8134-1b178943ee96

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FrendsPlatform/Frends.HTTP/sessions/a1252305-c656-43df-8134-1b178943ee96

Co-authored-by: MichalFrends1 <167774394+MichalFrends1@users.noreply.github.com>
…frends-http-request

Add proxy configuration support to Frends.HTTP.Request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

Warning

Rate limit exceeded

@MichalFrends1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 51 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 850ef52e-8246-4957-9f93-c8878649f998

📥 Commits

Reviewing files that changed from the base of the PR and between 482e4d3 and e6ea44a.

📒 Files selected for processing (5)
  • Frends.HTTP.Request/CHANGELOG.md
  • Frends.HTTP.Request/Frends.HTTP.Request.Tests/UnitTests.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Definitions/Options.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Extensions.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Request.cs

Walkthrough

This PR adds HTTP proxy support with URL, username, and password configuration options. The proxy handler is conditionally configured when a proxy URL is supplied, with credentials applied when credentials are provided. Proxy password is securely hashed in the HTTP client cache key to avoid embedding secrets. Two new unit tests validate proxy handler setup and cache key differentiation.

Changes

HTTP Proxy Configuration Support

Layer / File(s) Summary
Proxy Configuration Contract
Frends.HTTP.Request/Definitions/Options.cs
Three new properties added: ProxyUrl, ProxyUsername, and ProxyPassword (with [PasswordPropertyText] annotation).
Handler Proxy Setup
Frends.HTTP.Request/Extensions.cs
SetHandlerSettingsBasedOnOptions now creates a WebProxy when ProxyUrl is provided, enables proxy usage, and sets credentials if ProxyUsername is non-empty.
Secure Cache Key Logic
Frends.HTTP.Request/Request.cs
Added using System.Security.Cryptography; and extended GetHttpClientCacheKey to include proxy URL and username; new GetCacheKeyHash helper hashes proxy password via SHA-256 instead of embedding it directly.
Proxy Tests & Verification
Frends.HTTP.Request/Tests/UnitTests.cs
Added HandlerShouldUseConfiguredProxy test to verify handler proxy and credentials configuration; added HttpClientCacheKeyShouldIncludeProxyOptions test to verify cache key differentiation and password hashing.
Version & Release Notes
Frends.HTTP.Request/Frends.HTTP.Request.csproj, Frends.HTTP.Request/CHANGELOG.md
Package version updated to 1.11.0; changelog documents new proxy options and their cache key inclusion.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • MatteoDelOmbra

Poem

🐰 A proxy path, so secure and so tight,
With passwords hashed, kept out of sight,
WebProxy flows where the credentials go,
Cache keys dance with the secrets below! 🔐✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fspes 115' is vague and does not clearly convey the main change of adding HTTP proxy configuration options to the request handler. Replace with a descriptive title such as 'Add HTTP proxy configuration options' or similar that clearly indicates the primary change being implemented.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FSPES-115

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Frends.HTTP.Request/Frends.HTTP.Request.Tests/UnitTests.cs`:
- Around line 438-461: Extend the HttpClientCacheKeyShouldIncludeProxyOptions
test to also verify that when two Options instances differ only in ProxyPassword
the resulting cache keys from HTTP.GetHttpClientCacheKey are different and that
neither key contains the plain ProxyPassword; create a third Options (e.g.,
optionsWithProxyDifferentPassword) copying optionsWithProxy but changing
ProxyPassword, invoke the private static method via reflection to get its cache
key, and add assertions that keyWithProxy != keyWithProxyDifferentPassword and
that keyWithProxyDifferentPassword does not contain the raw password string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 173e50d5-9914-4ee3-80d0-bc483fc3e095

📥 Commits

Reviewing files that changed from the base of the PR and between 7abf6a4 and 482e4d3.

📒 Files selected for processing (6)
  • Frends.HTTP.Request/CHANGELOG.md
  • Frends.HTTP.Request/Frends.HTTP.Request.Tests/UnitTests.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Definitions/Options.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Extensions.cs
  • Frends.HTTP.Request/Frends.HTTP.Request/Frends.HTTP.Request.csproj
  • Frends.HTTP.Request/Frends.HTTP.Request/Request.cs

Comment thread Frends.HTTP.Request/Frends.HTTP.Request.Tests/UnitTests.cs Outdated
Comment thread Frends.HTTP.Request/Frends.HTTP.Request/Definitions/Options.cs
Comment thread Frends.HTTP.Request/Frends.HTTP.Request/Extensions.cs Outdated
Comment thread Frends.HTTP.Request/Frends.HTTP.Request/Extensions.cs Outdated
Comment thread Frends.HTTP.Request/Frends.HTTP.Request/Request.cs Outdated
@MatteoDelOmbra
Copy link
Copy Markdown
Contributor

do we want to add same option to other http tasks?

@MatteoDelOmbra MatteoDelOmbra merged commit 55f550b into main May 8, 2026
7 checks passed
@MatteoDelOmbra MatteoDelOmbra deleted the FSPES-115 branch May 8, 2026 05:53
@coderabbitai coderabbitai Bot mentioned this pull request May 13, 2026
8 tasks
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