The TLS iOS SDK provides a unified response wrapper for each implemented interface. This document describes how to obtain various response information from the SDK.
Retrieve request response fields
You can use response.fieldName to obtain the return fields of each API described in CreateProject. Code example: Retrieve the HTTP status code
You can use response.statusCode to obtain the response code for the request. Code example:
Retrieve error information
If the response code is not 200, you can use response.errorCode and response.errorMessage to obtain the error code and error description, which can help you troubleshoot issues. Code example:
Retrieve the request RequestId
To obtain assistance from TLS support when encountering difficulties during TLS API calls, you can use response.requestId to record the requestId of the Exception request and provide it to TLS staff for faster issue response and resolution. Code example:
Serialize the request response as a JSON string
You can also directly serialize the response using the toJSONString method to visually inspect the request response. Code example: