Form Auto Content

JSON →
library 3.2.1 ·javascript
verified May 27, 2026

form-auto-content is a utility library designed to simplify the creation of HTTP request payloads for web applications, intelligently determining the correct `Content-Type` header and payload format. It automatically switches between `application/x-www-form-urlencoded` and `multipart/form-data` based on the input data: if JavaScript `Stream` objects or `Buffer` instances are present within the input, it defaults to `multipart/form-data` for handling file uploads; otherwise, it constructs a standard `x-www-form-urlencoded` string. The current stable version is 3.2.1, indicating active development with a release cadence that includes minor and patch updates for new features, dependency management, and bug fixes, typically released as needed rather than on a fixed schedule. A key differentiator is its robust auto-sensing capability, allowing developers to pass a single JavaScript object without explicitly specifying the `enctype`. It gracefully handles complex data structures, including nested arrays, and supports advanced file options like custom filenames and content types for `multipart` fields. This makes it particularly useful for interacting with HTTP servers, especially within Node.js environments for server-side forms or API client libraries, and it integrates well with frameworks like Fastify and testing utilities such as `light-my-request`. The library also provides an API to customize the output field names for the generated payload stream and headers object.

total hits 14
actors 7 distinct systems
last hit 6d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany