Shih Tzu
dog · Tibet
curl -sS \
"https://example-data.com/api/v1/pet-breeds/12" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/pet-breeds/12"
);
const petBreed = await res.json();import type { PetBreed } from "https://example-data.com/types/pet-breeds.d.ts";
const res = await fetch(
"https://example-data.com/api/v1/pet-breeds/12"
);
const petBreed = (await res.json()) as PetBreed;import requests
res = requests.get(
"https://example-data.com/api/v1/pet-breeds/12"
)
pet_breed = res.json() {
"id": 12,
"name": "Shih Tzu",
"slug": "shih-tzu",
"species": "dog",
"origin": "Tibet",
"temperament": [
"Affectionate",
"Playful",
"Outgoing"
],
"lifeExpectancyYears": 13,
"isHypoallergenic": true,
"createdAt": "2021-07-03T03:59:43.707Z"
}