Skip to content

Conversation

@kitlangton
Copy link
Contributor

Type

  • Feature

Description

Adds HttpApp.fromWebHandler - the inverse of toWebHandler. This wraps a standard web handler (Request) => Promise<Response> so it can be used within an Effect HTTP application.

This completes the web interop API symmetry:

Direction Request Response HttpApp
web → Effect fromWeb fromWeb fromWebHandler
Effect → web toWeb toWeb toWebHandler

Example Usage

import { HttpApp } from "@effect/platform"

// Wrap any web handler (e.g., BetterAuth, Hono)
const WebApp = HttpApp.fromWebHandler(async (request) => {
  return new Response("Hello from web handler!")
})

Tests

  • Basic GET request
  • POST with JSON body
  • Request headers preservation
  • Response status/headers preservation
  • Round-trip with toWebHandler

@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Dec 12, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

🦋 Changeset detected

Latest commit: 8290b17

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
Copy link
Contributor

#5902

@tim-smart tim-smart closed this Dec 13, 2025
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Done in PR Backlog Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants