Skip to content

C# HTTP handlers - Module Bindings#5024

Open
JasonAtClockwork wants to merge 3 commits into
phoebe/http-handlers-webhooksfrom
jlarabie/http-handler-csharp
Open

C# HTTP handlers - Module Bindings#5024
JasonAtClockwork wants to merge 3 commits into
phoebe/http-handlers-webhooksfrom
jlarabie/http-handler-csharp

Conversation

@JasonAtClockwork
Copy link
Copy Markdown
Contributor

Description of Changes

Adding C# HTTP handlers based on #4636

  • adds the C# handler/router API [SpacetimeDB.HttpHandler], [SpacetimeDB.HttpRouter]
  • wires C# HTTP handlers into module definition/build/runtime registration
  • mirrors the Rust/TypeScript HTTP smoketests and adds C# docs coverage
  • updates the HTTP handlers docs with C# examples
  • refactored ProcedureContext to allow for a central location for WithTx/TryWithTx to support HandlerContext
  • routes use a generated Handlers.* tokens to avoid raw strings

API and ABI breaking changes

Adds new APIs for the HTTP handler and should not be breaking

Expected complexity level and risk

3 - this hit the binding, module registration, and had a decent refactor for ProcedureContext

Testing

  • Expanded crates/smoketests/tests/smoketests/http_routes.rs with C# mirrors of the Rust HTTP
    route tests

I also did some manual testing with a throw away project, and will be adding to the module-test after all languages are caught up on HTTP handlers.

@JasonAtClockwork JasonAtClockwork self-assigned this May 14, 2026
@JasonAtClockwork JasonAtClockwork marked this pull request as ready for review May 14, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant