Skip to content

Replace postman-request with axios#278

Merged
aviadhahami merged 3 commits intomasterfrom
copilot/upgrade-postman-request-package
Mar 10, 2026
Merged

Replace postman-request with axios#278
aviadhahami merged 3 commits intomasterfrom
copilot/upgrade-postman-request-package

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

postman-request is a deprecated fork of the unmaintained request library. Replace with axios.

Changes

  • src/index.js: Swap postman-request + util.promisify for an axios instance. Response shape (statusCode, body, request.path) is preserved so handleVaultResponse and all callers are unchanged.
  • index.d.ts: request.CoreOptionsAxiosRequestConfig
  • package.json: Drop postman-request, @types/request; add axios@^1.13.6

Notes

  • config['request-promise'] dependency injection still works — existing consumers passing a custom request implementation are unaffected.
  • VAULT_SKIP_VERIFY mapped to https.Agent({ rejectUnauthorized: false }) (equivalent to prior strictSSL: false).
  • validateStatus: () => true replicates simple: false — lets vault response handler deal with non-2xx codes.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr ready 278 (http block)
    • Triggering command: /usr/bin/gh gh auth status (http block)
    • Triggering command: /usr/bin/gh gh api graphql -f query= mutation { markPullRequestReadyForReview(input: {pullRequestId: ""}) { pullRequest { isDraft } } } (http block)
  • https://api.github.com/repos/nodevault/node-vault/pulls/278
    • Triggering command: /usr/bin/curl curl -s -X PATCH -H Authorization: ****** -H Accept: application/vnd.github+json REDACTED -d {"draft": false} (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 10, 2026 22:45
- Remove postman-request dependency
- Remove @types/request devDependency
- Add axios as HTTP client
- Update src/index.js with axios-based request wrapper that maintains
  the same response interface (statusCode, body, request.path)
- Update index.d.ts to use AxiosRequestConfig instead of request.CoreOptions

Co-authored-by: aviadhahami <7353632+aviadhahami@users.noreply.github.com>
…tatus

Co-authored-by: aviadhahami <7353632+aviadhahami@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade postman-request package to modern alternative Replace postman-request with axios Mar 10, 2026
@aviadhahami aviadhahami marked this pull request as ready for review March 10, 2026 23:14
@aviadhahami aviadhahami enabled auto-merge March 10, 2026 23:16
@aviadhahami aviadhahami disabled auto-merge March 10, 2026 23:17
@aviadhahami aviadhahami merged commit 34750ab into master Mar 10, 2026
9 checks passed
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.

2 participants