apimposter/mocks/test/secure.yaml
2025-03-25 13:26:36 +01:00

17 lines
384 B
YAML

- method: "GET"
path: "/"
conditionalResponses:
- conditions:
headers:
Authorization: "Bearer abc123"
response:
status: 200
headers: { Content-Type: "application/json" }
body:
message: "Access granted"
response:
status: 401
headers: { Content-Type: "application/json" }
body:
error: "Unauthorized"