curl -sS \
"https://example-data.com/api/v1/jokes/8" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/jokes/8"
);
const joke = await res.json();import type { Joke } from "https://example-data.com/types/jokes.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/jokes/8"
);
const joke = (await res.json()) as Joke;import requests
res = requests.get(
"https://example-data.com/api/v1/jokes/8"
)
joke = res.json() {
"id": 8,
"setup": "How do you organize a space party?",
"punchline": "You planet.",
"category": "pun",
"rating": 4.1,
"createdAt": "2026-02-28T19:08:02.724Z"
}