This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The [request](https://www.npmjs.com/package/request) library has been deprecated for some time. This change: 1. Replaces use of request (the library) with the `request` function from [undici](https://github.com/nodejs/undici), which has been adopted by Node to provide an implementation of the now-standard [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) web API. This `request` API is almost but not quite identical to `fetch`, but undici's `fetch` is not available for some of our currently supported Node versions. 2. Refactors the three very similar dev-facing API endpoints provided by enketo-transformer's `app.js`. This isn't strictly necessary but it was easier to reason about than applying the same changes repeatedly, and... 3. ... caught/fixed a bug where the POST handler always returned a 400 Bad Request for valid POST bodies with an `xform` property.
- Loading branch information