R HTTP 400错误请求错误

R HTTP 400错误请求错误,r,web-services,curl,rcurl,R,Web Services,Curl,Rcurl,我试图发布一个XML文件(test1.XML)并从WebServiceAPI接收输出。我收到一个错误HTTP/1.1400错误请求。这是下面的代码 myheader=c(Connection="close", 'Content-Type' = "application/xml", 'Content-length' =nchar("test1.xml")) data = getURL("http://abcd/efg/requests/",

我试图发布一个XML文件(test1.XML)并从WebServiceAPI接收输出。我收到一个错误HTTP/1.1400错误请求。这是下面的代码

 myheader=c(Connection="close", 
       'Content-Type' = "application/xml",
       'Content-length' =nchar("test1.xml"))

 data =  getURL("http://abcd/efg/requests/",
           userpwd="m12345:123456", httpauth = 1L,
           postfields="test1.xml",
           httpheader=myheader,
           verbose=TRUE)
这是输出

 * Hostname was NOT found in DNS cache
 *   Trying 123.456.789.123...
 * Connected to rcftomdev1 (123.456.789.123) port 8086 (#0)
 * Server auth using Basic with user 'm12345'
 > POST /dart/requests/ HTTP/1.1
 Authorization: Basic bTEzNDQ4M#$#$#$#$%5==
 Host: abcd:8086
 Accept: */*
 Connection: close
 Content-Type: application/xml
 Content-length: 9

 * upload completely sent off: 9 out of 9 bytes
 < HTTP/1.1 400 Bad Request
 < Server: Apache-Coyote/1.1
 < Content-Type: text/html;charset=utf-8
 < Content-Length: 968
 < Date: Tue, 20 Jan 2015 07:50:05 GMT
 < Connection: close
 < 
 * Closing connection 0
在DNS缓存中找不到主机名 *正在尝试123.456.789.123。。。 *连接到rcftomdev1(123.456.789.123)端口8086(#0) *对用户“m12345”使用Basic进行服务器身份验证 >POST/dart/requests/HTTP/1.1 授权:基本bTEzNDQ4M#$#$#$#$%5== 主持人:abcd:8086 接受:*/* 连接:关闭 内容类型:application/xml 内容长度:9 *上传已完全发送:9个字节中的9个
不确定我哪里出错了,需要帮助吗?

如果这确实是在给定用户+密码的授权:标题中发送的内容,那么当您的组合创建
bTEyMzQ1OjEyMzQ1Ngo=
时,发生了严重错误

请求的其他方面看起来很好,因此只有阅读此服务器和API的服务器端需求才能给出答案