OpenAPITools / OpenAPITools/openapi-generator

[REQ][typescript-node] Migrate to a different Node.js HTTP client

Open
#5,334 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: TypeScript Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

request, the HTTP client used in the typescript-node has been deprecated recently: request/request#3142
There's no rush here, since request will continue working.

Describe the solution you'd like

A new module should be picked, or implementation changed to use the core HTTP module. Additionally, I think the transition would be the smoothest if we introduced the new module along-side typescript-node, and switched them around once we're confident the new one is stable.

Describe alternatives you've considered

The alternative to this work is to, well, not do it. Folks can continue using typescript-node until something breaks request, use typescript-axios, hack typescript-fetch to work on node, etc.

If we decide to migrate, alternatives are:

  • Change implementation to use the core HTTP module - meh
  • Use another popular and well-understood module:
    • got
    • needle
    • superagent
    • ...

In my opinion, got has the API that is most similar to the one we expose right now.

Additional context

I would be willing to work on this change (I'm an active user of said generator), given maintainers' and community buy-in.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the typescript-node generator and inventory how it currently uses the deprecated request client and what HTTP behavior its generated clients expose. Compare got, needle, superagent, and the core HTTP module, then define a migration path that can run alongside typescript-node before switching implementations. Done means maintainers have selected an alternative and the generator and its validation cover the replacement without breaking the existing client API.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.