问题
I am trying to POST an xml object using httr
In my application, I am creating the XML object like this:
doc <- htmlTreeParse(conts, useInternalNodes = T)
xmlFormula <- xpathSApply(doc, "//*/textarea", xmlValue)
x <- xmlParseString(xmlFormula)
Then I modify the xml on the fly
and now want to post it using httr without saving it to disk and uploading from a file
POST(MYURL, body=x) # this won't work
Is there a method to make the xml object httr friendly?
来源:https://stackoverflow.com/questions/26706159/post-xml-form-using-httr