Skip to content

Commit

Permalink
rename to "response" to match API playground
Browse files Browse the repository at this point in the history
so I can incorporate other's suggestions quicker
  • Loading branch information
wibeasley committed Oct 1, 2022
1 parent 31d1d86 commit 97ede79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/kernel-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ kernel_api <- function(
# stop("The url `", redcap_uri, "` is not found or throws an error.")
# }

result <- httr::POST(
response <- httr::POST(
url = redcap_uri,
body = post_body,
config = config_options,
Expand All @@ -82,10 +82,10 @@ kernel_api <- function(
httr::user_agent("OuhscBbmc/REDCapR")
)

status_code <- result$status
status_code <- response$status
success <- (status_code == 200L)
raw_text <- httr::content(
x = result,
x = response,
as = "text",
encoding = encoding, # UTF-8 is the default parameter value
type = content_type # text/csv is the default parameter value
Expand All @@ -112,8 +112,8 @@ kernel_api <- function(
success = success,
raw_text = raw_text,
elapsed_seconds = elapsed_seconds,
result = result,
result_headers = result$headers,
result = response,
result_headers = response$headers,

regex_empty = regex_empty
))
Expand Down

0 comments on commit 97ede79

Please sign in to comment.