Skip to main content

Module intake

Module intake 

Source
Expand description

Content-based classification of axum request parts into the Request sum type.

Rules:

  1. POST + body parses as JSON-RPC → Request::Mcp with transport: StreamableHttpPost.
  2. GET + Accept: text/event-streamRequest::Mcp with transport: SseLegacyGet (synthetic envelope; downstream matches on transport variant, not envelope contents).
  3. DELETE + mcp-session-id header → Request::Mcp with a synthetic envelope so SessionDeleteMiddleware can pattern-match on Request::Mcp.
  4. Everything else → Request::Raw.

OAuth classification is deferred. Non-MCP traffic becomes Request::Raw; UrlMapMiddleware rewrites JSON Raw bodies.

Functions§

from_axum_parts