Skip to content

Commit

Permalink
passing extra args to curlPerform
Browse files Browse the repository at this point in the history
  • Loading branch information
adigherman committed Feb 9, 2021
1 parent 14a60c1 commit 4bcd776
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions R/xnat_api.R
Expand Up @@ -265,6 +265,7 @@ get_scan_parameters_search_xml <- function(subject_ID = NULL,
#' xxx is provided by the \code{xnat_name} parameter
#' @param xnat_name prefix to use for retrieving the proper username/pass
#' system variables for a specific XNAT server
#' @param ... additional arguments passed to \code{\link{curlPerform}}.
#' @examples
#' ## Connect to the NITRC.ORG database
#' \dontrun{xnat_connect('https://nitrc.org/ir', xnat_name='NITRC')}
Expand All @@ -277,9 +278,9 @@ get_scan_parameters_search_xml <- function(subject_ID = NULL,
#' @importFrom httr set_cookies timeout
#' @importFrom tibble as_tibble
#' @export
xnat_connect <- function(base_url, username=NULL, password=NULL, xnat_name=NULL)
xnat_connect <- function(base_url, username=NULL, password=NULL, xnat_name=NULL, ...)
{
xnat_call <- function(request, customrequest = 'GET', data='') {
xnat_call <- function(request, customrequest = 'GET', data='', ...) {
if(is.null(jsid)) {
stop('not connected')
}
Expand All @@ -294,7 +295,8 @@ xnat_connect <- function(base_url, username=NULL, password=NULL, xnat_name=NULL)
customrequest = customrequest,
postfields = data,
ssl.verifypeer = FALSE,
cookie = paste('JSESSIONID=', jsid, sep = ''))
cookie = paste('JSESSIONID=', jsid, sep = ''),
...)
msg = ""
if (!is.null(xnat_name)) {
msg = paste0(
Expand Down
4 changes: 3 additions & 1 deletion man/xnat_connection.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4bcd776

Please sign in to comment.