API_Base.ServiceCallResult
Class
global inherited sharing class API_Base.ServiceCallResultTracks the request, response, and status of a web service call.
Since: 1.0
Example:
API_Base.ServiceCallResult result = handler.result;
Boolean success = result.isSuccess;Properties
| Property | Description |
|---|---|
| global Boolean hasFailed | Indicates if the service call failed. |
| global Boolean isAborted | Indicates if the service call was aborted. |
| global Boolean isSuccess | Indicates if the service call completed successfully. |
| global String statusText | Text representation of the service status. |
Fields
| Field | Description |
|---|---|
| global List errors | List of errors encountered during the service call. |
| global Boolean isMocked | Indicates if the service call response was mocked. |
| global Boolean parseError | Indicates the response was successfully received from the remote endpoint but parseResponse() failed (typically a JSON deserialization error or unexpected payload shape). |
| global String requestBody | The request body sent. |
| global DTO_NameValues requestHeaders | Request headers as name-value pairs. |
| global String responseBody | The response body received. |
| global DTO_NameValues responseHeaders | Response headers as name-value pairs. |
| global API_Base.WebserviceStatus status | The status of the web service call. |
| global String statusCode | The HTTP status code for the request. |
| global String url | The URL of the endpoint accessed. |
Property Details
hasFailed
global Boolean hasFailedType: Boolean
Indicates if the service call failed.
Since:
isAborted
global Boolean isAbortedType: Boolean
Indicates if the service call was aborted.
Since:
isSuccess
global Boolean isSuccessType: Boolean
Indicates if the service call completed successfully.
Since:
statusText
global String statusTextType: String
Text representation of the service status.
Since:
Field Details
errors
global List<String> errorsType: List
List of errors encountered during the service call.
Since: 1.0
isMocked
global Boolean isMockedType: Boolean
Indicates if the service call response was mocked.
Since: 1.0
parseError
global Boolean parseErrorType: Boolean
Indicates the response was successfully received from the remote endpoint but parseResponse() failed (typically a JSON deserialization error or unexpected payload shape). When true the transport itself succeeded — the status code and body are populated — but responsePayload is unreliable. Subscribers branch on this to distinguish parse failure from transport failure without inspecting errors[] strings.
Since: 1.0
requestBody
global String requestBodyType: String
The request body sent.
Since: 1.0
requestHeaders
global DTO_NameValues requestHeadersType: DTO_NameValues
Request headers as name-value pairs.
Since: 1.0
responseBody
global String responseBodyType: String
The response body received.
Since: 1.0
responseHeaders
global DTO_NameValues responseHeadersType: DTO_NameValues
Response headers as name-value pairs.
Since: 1.0
status
global API_Base.WebserviceStatus statusType: API_Base.WebserviceStatus
The status of the web service call.
Since: 1.0
statusCode
global String statusCodeType: String
The HTTP status code for the request.
Since: 1.0
url
global String urlType: String
The URL of the endpoint accessed.
Since: 1.0