This commit is contained in:
John Vandenberg
2025-01-11 15:44:42 +08:00
committed by GitHub
parent 29f7c2ea0b
commit eb47b9d836
27 changed files with 62 additions and 62 deletions

View File

@@ -389,7 +389,7 @@ ApiClient <- R6::R6Class(
#'
#' @param local_var_resp The API response
#' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is.
#' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne.
#' @return If the raw response is corecable to text, return the text. Otherwise return the raw response.
DeserializeResponse = function(local_var_resp, return_type = NULL) {
text <- local_var_resp$response_as_text()
if (is.na(text)) {
@@ -406,8 +406,8 @@ ApiClient <- R6::R6Class(
#' The function will write out data.
#'
#' 1. If binary data is detected it will use `writeBin`
#' 2. If the raw response is coercable to text, the text will be written to a file
#' 3. If the raw response is not coercable to text, the raw response will be written
#' 2. If the raw response is coercible to text, the text will be written to a file
#' 3. If the raw response is not coercible to text, the raw response will be written
#'
#' @param local_var_resp The API response
#' @param file The name of the data file to save the result