example-data.com

meals / #2

userId
Charlene Roberts @charlene_roberts
name
Turkey Sandwich
kind
lunch
calories
552
proteinGrams
44.1
carbsGrams
19.5
fatGrams
33.1
eatenAt
createdAt

Component variants

Related

curl -sS \
  "https://example-data.com/api/v1/meals/2" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/meals/2"
);
const meal = await res.json();
import type { Meal } from "https://example-data.com/types/meals.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/meals/2"
);
const meal = (await res.json()) as Meal;
import requests

res = requests.get(
    "https://example-data.com/api/v1/meals/2"
)
meal = res.json()
{
  "id": 2,
  "userId": 1,
  "name": "Turkey Sandwich",
  "kind": "lunch",
  "calories": 552,
  "proteinGrams": 44.1,
  "carbsGrams": 19.5,
  "fatGrams": 33.1,
  "eatenAt": "2025-08-09T01:35:41.058Z",
  "createdAt": "2025-08-09T01:51:22.381Z"
}
Draftbit