如何在 R 包 "httr" 中将 -k 或 --insecure 参数传递给 curl?

How to pass the -k or --insecure argument to curl in the R package "httr"?

TLDR: 我收到一条错误消息:

schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.

根据 this thread,我必须强制 curl 忽略证书错误,因此需要参数 -k-insecure。 快速 Google 搜索让我找到了 set_config(config( ssl_verifypeer = 0L )),但完全没有任何作用...

有人知道正确的 httr 语法来正确命令 curl 忽略该错误吗?

更新: 我用这个命令修复了问题:

httr::set_config(httr::config(ssl_verifypeer = 0L, ssl_verifyhost = 0L))