Skip to content

Commit

Permalink
check incoming parameters to kernel_api
Browse files Browse the repository at this point in the history
ref #396
  • Loading branch information
wibeasley committed Jul 19, 2022
1 parent 3bab1fc commit e7aa6ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/kernel-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@ kernel_api <- function(
content_type = "text/csv"
) {

checkmate::assert_character(redcap_uri , len = 1, any.missing = FALSE, null.ok = FALSE)
checkmate::assert_character(encoding , len = 1, any.missing = FALSE, null.ok = FALSE)
checkmate::assert_character(content_type , len = 1, any.missing = FALSE, null.ok = FALSE)

start_time <- Sys.time()

# if (httr::http_error(redcap_uri)) {
# stop("The url `", redcap_uri, "` is not found or throws an error.")
# }

result <- httr::POST(
url = redcap_uri,
body = post_body,
Expand Down

0 comments on commit e7aa6ff

Please sign in to comment.