API003infoPro

missing-content-type

POST/PUT requests without Content-Type may fail or be misinterpreted

Applies to: Go, JavaScript, Python, Ruby, Rust, TypeScript

Why this matters

When you send data to an API without specifying Content-Type, the server might not understand your data format. Always set Content-Type: application/json when sending JSON data.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, API003 includedstablestack explain API003

API003 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: API003