link
fastapi/get-route

GET Route

Create GET endpoint

routing
http

Command

Examples

Get all items

@app.get("/items/")
  def read_items():
      return [{"name": "Item 1"}, {"name": "Item 2"}]