Repository navigation
Add multipart request support - #1761
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for multipart and URL-encoded form data submissions, allowing binary file uploads (via a new HttpFile interface) and preserving custom content-type headers (such as multipart boundaries) across HTTP requests and redirects. Key changes include updating the HTTP client, resource, and JSON response helpers to accept Buffer payloads, introducing a form-finalization helper, and updating the API mustache templates to generate form-handling code. Feedback on these changes highlights a potential issue with duplicate headers due to case-sensitive merging in finalizeRequestForm, as well as potential runtime crashes in the generated templates if null parameters bypass the !== undefined checks instead of using != null guards.
6aa5285 to
3f2cda9
Compare
3f2cda9 to
20d2d89
Compare
Description
Add reusable multipart and URL-encoded request support to the Node.js API library. This updates the TypeScript API template, binary HTTP transport, shared
HttpFiletype, and form helpers. Generated Document Collector services and models are intentionally excluded and will be regenerated by SDK Automation after this change is merged.Tested scenarios
Fixed issue: N/A