# AttributeError: 'Request' object has no attribute 'json'

- **ID:** `python/fastapi-attributeerror-starlette-request-json`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using request.json directly instead of await request.json() in async handlers.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Use await request.json()** (95% success)
   ```
   @app.post('/data')
async def handle(request):
    data = await request.json()
    return {'received': data}
   ```
2. **Use FastAPI's Body dependency** (90% success)
   ```
   from fastapi import Body
@app.post('/data')
async def handle(data: dict = Body(...)):
    return {'received': data}
   ```

## Dead Ends

- **Using request.body() without await** — Similar issue: body is a coroutine. (70% fail)
- **Importing json module and parsing manually** — Overcomplicates; Starlette provides built-in method. (50% fail)
