Skip to content

Add multipart request support - #1761

Merged
gcatanese merged 1 commit into
mainfrom
feat/handling-multipart-request
Aug 24, 2026
Merged

gcatanese merged 1 commit into
mainfrom
feat/handling-multipart-request

Conversation

@gcatanese

Copy link
Copy Markdown
Contributor

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 HttpFile type, 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

  • TypeScript build
  • ESLint
  • Complete Jest suite: 628 passed, 27 skipped
  • Multipart content type and boundary preservation
  • Binary Buffer transmission and 308 redirect replay
  • API key, basic authentication, and custom headers
  • URL-encoded and multipart form serialization
  • Production dependency audit with zero findings

Fixed issue: N/A

@gcatanese
gcatanese requested a review from a team as a code owner August 24, 2026 08:47
@gcatanese gcatanese added the Feature New feature or request label Aug 24, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/helpers/requestForm.ts Resolved
@gcatanese
gcatanese force-pushed the feat/handling-multipart-request branch 2 times, most recently from 6aa5285 to 3f2cda9 Compare August 24, 2026 09:12
@gcatanese
gcatanese enabled auto-merge August 24, 2026 09:40
@gcatanese
gcatanese force-pushed the feat/handling-multipart-request branch from 3f2cda9 to 20d2d89 Compare August 24, 2026 12:19
@gcatanese
gcatanese added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit 180c4d1 Aug 24, 2026
4 checks passed
@gcatanese
gcatanese deleted the feat/handling-multipart-request branch August 24, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants