Example 13890
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": "Everett Botsford",
"email": "Lisa21@hotmail.com",
"role": "admin"
},
{
"id": 2,
"name": "Lera Boyer",
"email": "Ubaldo37@gmail.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "3238da0c-19db-4944-8c52-b44cdac9dc3c"
}
delay_ms: 317 # simulated latency
}