Example 11687
API Mock
Mock API response payloads for testing.
# Mock API definition
{
endpoint: "/api/v1/users"
method: "GET"
status: 200
# JSON response body
response: """
[
{
"id": 1,
"name": "Lucinda Fisher",
"email": "Josephine_Leannon2@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Ms. Velma Effertz",
"email": "Mya57@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "6740f8fe-0cd1-4f52-83db-ad9f36d42adc"
}
delay_ms: 246 # simulated latency
}