使用RCURL上传文件 - 问题

时间:2017-11-24 09:59:48

标签: r rcurl

在这里,我想使用Intranet URL中的以下命令将文件附加到某个策略/索赔号。

library(RCurl)

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 = CONTAINS SOAP DATA, 
  writefunction = reader$update, 
  verbose =  TRUE, 
  httpauth = AUTH_BASIC)
)

getForm(
  uri = "INTRANET URL", 
  file = fileUpload(
    filename = "C:\\Users\\Username\\Desktop\\image001.pdf",
    contentType = "application/pdf"
  ),
  upload = TRUE
)

当我运行上述命令时,我的状态为“HTTP / 1.1 200 OK”,但服务的响应显示没有附件。

  • 无法在_netrc文件中找到主机applications.test.intra.XXXXX.nl;使用默认值
  • 尝试11.11.11.11 ... *连接到URL(11.11.11.11)端口443(#0)
  • 成功设置证书验证位置:* CAfile:C:/ Program Files / R / R-3.4.2 / library / RCurl / CurlSSL / cacert.pem CApath:none *使用TLSv1.0 / ROOT *服务器证书的SSL连接:
  • 主题:CN = applications-tst.XX.XXXXX.com *开始日期:DATE TIMESTAMP GMT
  • 到期日期:DATE TIMESTAMP GMT * subjectAltName:applications.test.intra.XXXXX.XX匹配
  • 发行人:DC = com; DC = XXXXX; DC = US; CN = XXXXX-SHA2-Issuing-us-XXXXXXXXXX-CA * SSL证书验证确定。
  • 使用Basic和用户'USERID'

    进行服务器身份验证
      

    POST /QUALIFIER1/QUALIFIER2/QUALIFIER3?file=C%3A%5CUsers%5CUSERNAME%5CDesktop%5Cimage001.pdf&file=character%280%29&file=application%2Fpdf&upload=TRUE HTTP / 1.1   授权:基本XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX =主机:applications.test.intra.XXXXX.nl   Accept:text / xml Accept:multipart / * Content-Type:text / xml;字符集= utf-8的   SOAPAction:https://applications.test.intra.XXXXX.nl/QUALIFIER1/QUALIFIER2/QUALIFIER3 Content-Length:2654 Expect:100-continue

  • 完成等待100-continue< HTTP / 1.1 200 OK< content-language:en-GB < content-type:text / xml; charset = utf-8<日期:2017年11月24日星期五11:33:00 GMT< p3p:CP =“XXX XXX XXX XXX XXX XXX” < transfer-encoding:chunked< cache-control:no-cache =“set-cookie,set-cookie2”<到期日:1994年12月1日星期四16:00:00 GMT < x-powered-by:Servlet / 3.0< Set-Cookie:LtpaToken2 = TOKEN;路径= /;安全;仅Http < Set-Cookie:BIGipServer~XX~isam-emp-applications_tst_11111 = 111111111.11111.1111;路径= /;仅Http;安全 < *连接#0以托管applications.test.intra.XXXXX.nl完好无损

0 个答案:

没有答案