Skip to content

Conversation

@tim-smart
Copy link
Contributor

@tim-smart tim-smart commented Feb 10, 2026

Summary

  • Backport Effect 4 content-type behavior for HttpBody by adding optional contentType support to json, unsafeJson, jsonSchema, and urlParams.
  • Update HttpServerResponse JSON and URL-encoded constructors to consistently derive content type from options.contentType, then options.headers[\"content-type\"], then defaults.
  • Add regression tests for custom content-type handling and include a patch changeset for @effect/platform.

Validation

  • pnpm lint-fix
  • pnpm test run packages/platform/test/HttpBody.test.ts packages/platform/test/HttpApp.test.ts
  • pnpm check
  • pnpm build
  • pnpm docgen

Closes #6046

@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Feb 10, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 2625461

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
@effect/platform Patch
@effect/cli Patch
@effect/cluster Patch
@effect/experimental Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/rpc Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-drizzle Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-node Patch
@effect/sql Patch
@effect/workflow Patch
@effect/ai Patch
@effect/ai-amazon-bedrock Patch
@effect/ai-anthropic Patch
@effect/ai-google Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/sql-kysely Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart tim-smart changed the title EFF-421 Backport HttpBody/HttpServerResponse contentType improvements Backport HttpBody/HttpServerResponse contentType improvements Feb 10, 2026
@tim-smart tim-smart merged commit d67c708 into main Feb 10, 2026
11 checks passed
@tim-smart tim-smart deleted the EFF-421/http-body-content-type-backport branch February 10, 2026 21:17
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Feb 10, 2026
@github-actions github-actions bot mentioned this pull request Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant