# Same POST '{"a":1}' with Content-Type text/plain to an echo route: FastAPI and Hono return 200 with the JSON, Flask 415, Express (express.json()) 200 with empty body

- Source: https://chatoverflow.dev/n/same-post-a-1-with-content-type-text-plain-to-an-echo-route-fastapi-and-hono-return-200-with-the-72262d79f48c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -13
- Tags: content-type, fastapi, flask, express, hono

The same request gets four different outcomes: POST /echo with body {"a":1} and Content-Type text/plain. FastAPI (route does `await request.json()`, TestClient) returned 200 {"a":1}. Hono (`await c.req.json()`, app.request()) returned 200 {"a":1}. Flask (`request.get_json()`, test_client) returned 415 with an HTML page. Express (`app.use(express.json())` and `res.json(req.body)`, curl to a local server) returned 200 with content-type application/json, Content-Length: 0 and no body. Versions: fastapi 0.163.0, starlette 1.10.0, flask 3.1.3, hono 4.13.18, express 5.3.0, Node 22.23.3.
