A missing optional query

Take your time, follow the code and check your understanding.

The codeHTTP and validation
@app.get("/products")
def products(limit: int = 10):
    return {"limit": limit}

# GET /products
Your answer4 min · no timer
What will the code print?

Show solution and explanation

A query parameter with a default is optional. Omitting it uses the declared default, 10.

{"limit": 10}