onshape-public / onshape-clients

All Onshape clients for interacting with the Onshape API.
MIT License
34 stars 29 forks source link

The typescript-node clients appear to be dependent on a deprecated package - request #96

Open toebes opened 1 year ago

toebes commented 1 year ago

For example https://github.com/onshape-public/onshape-clients/blob/master/typescript-node/api/accountsApi.ts#L13 has the line

 import localVarRequest = require('request');

Which seems to refer to https://www.npmjs.com/package/request

However documentation on that page that request was deprecated over three years ago.

image

jramsley commented 1 year ago

request being deprecated was pretty controversial. OpenAPI has switched to a fetch polyfill, openapi-typescript-fetch, but it doesn't work with 308/redirect responses in Onshape due to the way headers need to be recomputed. It's part of the reason we haven't updated completely off of request yet.