Could you please explain to me why in FastAPI the following works:
@app.post("/items/v1/cards{sku}")
async def create_item(sku: str):
return {"status":200,"sku":sku} # returns status:200 and sku
but, the same endpoint with questionmark in it like the one given below does not?
@app.post("/items/v1/cards?{sku}")
async def create_item(sku: str):
return {"sku":sku} # returns 404