Description Usage Arguments Details Examples
View source: R/pki_enable_httr.R
Override configuration settings used by the 'httr' package to allow working with PKI-enabled web services.
1 2 3 4 5 6 | pki_enable_httr(
pki_file = NULL,
ca_file = NULL,
password = NULL,
override = FALSE
)
|
pki_file |
string: file path to a pki certificate |
ca_file |
string: file path to a Certificate Authority (CA) bundle |
password |
string: passphrase used to encrypt/decrypt the private key of the PKI certificate |
override |
logical: force override of a pre-existing mypki configuration file if found. |
Default mypki configuration settings will be used unless otherwise specified. The PKI certificate file must be in PKCS#12 format. The following httr::config
settings are modified: cainfo, sslcert, sslkey.
If a mypki configuration file cannot be found, users are prompted for filepaths to a PKI certificate and a Certificate Authority (CA) bundle.
1 2 3 4 5 6 7 8 9 | library(rpki)
pki_enable_httr() # will prompt for passphrase
GET("http://httpbin.org/")
library(rpki)
pki_enable_httr(pki_file = "my_pki.p12",
ca_file = "my_ca.crt",
password = "my_pki_passphrase")
GET("http://httpbin.org/")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.