API_MockFactory.MockResponse
Class
apex
global class API_MockFactory.MockResponseRepresents a mock HTTP response with fault simulation options.
Since: 1.0
Fields
| Field | Description |
|---|---|
| global String body | The response body content (supports {{request.field}} interpolation). |
| global Map headers | Response headers as key-value pairs. |
| global String status | The HTTP status text (e.g., "OK", "Internal Server Error"). |
| global Integer statusCode | The HTTP status code. |
Field Details
body
apex
global String bodyType: String
The response body content (supports {{request.field}} interpolation).
Since: 1.0
headers
apex
global Map<String, String> headersType: Map
Response headers as key-value pairs.
Since: 1.0
status
apex
global String statusType: String
The HTTP status text (e.g., "OK", "Internal Server Error").
Since: 1.0
statusCode
apex
global Integer statusCodeType: Integer
The HTTP status code.
Since: 1.0