Skip to content

fix: expose rejectUnauthorized in RequestOptions - #919

Merged
fengmk2 merged 1 commit into
masterfrom
fix/request-options-reject-unauthorized
Sep 23, 2026
Merged

fengmk2 merged 1 commit into
masterfrom
fix/request-options-reject-unauthorized

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 23, 2026

Copy link
Copy Markdown
Member

Callers cannot set rejectUnauthorized on an object typed as RequestOptions, although the top-level request() and curl() helpers already support it.

Expose rejectUnauthorized?: boolean through RequestOptions and its RequestOptions2 alias. Both helpers use the public type. The documentation explains where the option applies and how to configure certificate verification for HttpClient instances and custom dispatchers.

Fixes #571.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: de75dc27-5c1e-408d-aeeb-be2a6f7c0372

📥 Commits

Reviewing files that changed from the base of the PR and between ea99071 and 7a04689.

📒 Files selected for processing (5)
  • README.md
  • src/Request.ts
  • src/index.ts
  • test/fixtures/ts-esm/hello.ts
  • test/urllib.options.rejectUnauthorized-false.test.ts
 __________________________________________________
< Turning your WTFs per minute into OMGs per hour. >
 --------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@919

commit: 7a04689

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.23%. Comparing base (ea99071) to head (7a04689).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #919   +/-   ##
=======================================
  Coverage   94.23%   94.23%           
=======================================
  Files          10       10           
  Lines         746      746           
  Branches      235      235           
=======================================
  Hits          703      703           
  Misses         40       40           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fengmk2
fengmk2 marked this pull request as ready for review September 23, 2026 12:16
Copilot AI lite review requested due to automatic review settings September 23, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fengmk2
fengmk2 merged commit 63b5595 into master Sep 23, 2026
19 of 20 checks passed
@fengmk2
fengmk2 deleted the fix/request-options-reject-unauthorized branch September 23, 2026 12:16
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.

Add rejectUnauthorized to RequestOptions

2 participants