Requests file is marked as depreciated in the migration guide #335
Replies: 3 comments 17 replies
-
@seriouslag we need to gather more information about what people use custom requests for. Ideally, we can replace those use cases with features, for example interceptors cover some of the cases with modifying requests/responses. If we're unable to do so, you should be able to write your own wrapper as you do now. But instead of passing it as a config value, you'd plug it into our packages. This is related to our effort around extracting |
Beta Was this translation helpful? Give feedback.
-
We use the request to extend ApiError with response headers. We also need the response headers for successful requests so we add some logic for that as well. Otherwise, we would not need it. |
Beta Was this translation helpful? Give feedback.
-
Another issue related to request.ts is that before in openapi-typescript-codegen it looked like:
this but now in this library it looks like this:
But only node-fetch 3 exports FormData and node-fetch 2 does not so we get some compilation error. We would like to use node-fetch 3 but it is ESM only so it is difficult to upgrade right now. |
Beta Was this translation helpful? Give feedback.
-
Per the title, there is no information on what will replace the functionality of the request file.
I personally use a request file for most of my projects.
https://heyapi.vercel.app/openapi-ts/migrating.html
Beta Was this translation helpful? Give feedback.
All reactions