Example 13791
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": "Roberto Abbott",
"email": "James.Steuber-Bartell95@yahoo.com",
"role": "admin"
},
{
"id": 2,
"name": "Sallie Bartoletti",
"email": "Eveline.Zboncak78@yahoo.com",
"role": "user"
}
]
"""
# Response headers
headers: {
Content-Type: "application/json"
X-Total-Count: "2"
X-Request-Id: "dcf99092-3fc3-4174-aee3-9c5d56ab6bd6"
}
delay_ms: 336 # simulated latency
}