【问题标题】:Error in curlOptions(..., .opts = .opts) : unnamed curl option(s):curlOptions(..., .opts = .opts) 中的错误:未命名的 curl 选项:
【发布时间】:2017-11-09 10:46:16
【问题描述】:

当我使用以下命令时 curlPerform(url = "此处为 Intranet URL",getURL("此处为 Intranet URL",userpwd = "USERID:PASSWORD",cainfo=system.file("CurlSSL","cacert.pem",package="RCurl")), httpheader = headerfields,postfields = body,writefunction = reader$update)

我收到如下所述的错误消息。

curlOptions(..., .opts = .opts) 中的错误:未命名的 curl 选项:HTTP/1.1 404 Not Found

找不到页面

找不到页面

您能否就这个错误向我提出建议。提前致谢。

【问题讨论】:

  • 使用 SOAPUI,我可以访问 Intranet URL 并获得响应。但不能对 RCurl 做同样的事情,请任何人提出建议
  • 请在下面的消息中提出建议> traceback() 9: stop(err) 8: stop.if.HTTP.error(http.header) 7: getURLContent(url, .opts = list(customrequest = "POST", ...), curl = curl, post = 1L) 6: httpPOST("INTRANET URL", userpwd = "USERID:PASSWORD") 5: 合并(list(...), .opts) 4: rev(merge(list(...), .opts)) 3: curlOptions(..., .opts = .opts) 2: curlSetOpt(..., .opts = .opts, curl = NULL, .encoding = .encoding) 1: curlPerform(httpPOST("INTRANET URL", userpwd = "USERID:PASSWORD"), httpheader = headerfields, postfields = body, writefunction = reader$update)

标签: r rcurl


【解决方案1】:

我使用 curl 如下

阅读器 = basicTextGatherer() curl = getCurlHandle()

options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"), followlocation = TRUE, httpheader = c(Accept = "text/xml",Accept = "multipart/*",'Content-Type' = "text/xml; charset=utf-8",SOAPAction="INTRANET URL"), userpwd = "USERID:PASSWORD", netrc = TRUE,timeout = 100, postfields = SOAP 详细信息,writefunction = reader$update,verbose=TRUE,curl = curl))

响应

【讨论】:

    猜你喜欢
    • 2016-11-03
    • 1970-01-01
    • 1970-01-01
    • 2022-12-22
    • 1970-01-01
    • 2019-05-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-02
    相关资源
    最近更新 更多