R/doctor.R

Defines functions check_for_nss httr_dr

Documented in httr_dr

#' Diagnose common configuration problems
#'
#' Currently one check: that curl uses nss.
#'
#' @export
httr_dr <- function() {
  check_for_nss()
}

check_for_nss <- function() {
  if (!grepl("^NSS", curl::curl_version()$ssl_version)) return()

  warning('
  ------------------------------------------------------------------------
  Your installed RCurl is linked to the NSS library (`libcurl4-nss-dev`)
  which is likely to cause issues.

  To resolve the problem:

  1. Quit R.

  2. Install OpenSSL (`apt-get install libcurl4-openssl-dev`) or
     GnuTLS (`apt-get install libcurl4-gnutls-dev`) variants of libCurl.

  3. Restart R.

  4. Reinstall RCurl: `install.packages("RCurl")`.
  ------------------------------------------------------------------------
  ', call. = FALSE)
}

Try the httr package in your browser

Any scripts or data that you put into this service are public.

httr documentation built on Aug. 15, 2023, 9:08 a.m.