我试图从Zuora中提取一些数据,但是rjson抛出了一个错误。
library(httr)
library(rjson)
query <- "https://api.zuora.com/rest/v1"
getdata <- GET(url=query, add_headers(apiAccessKeyId="Username", apiSecretAccessKey = "Password", Content-Type = "application/json"))
q <- fromJSON(content(getdata,type="text"))错误:
No encoding supplied: defaulting to UTF-8.
Error in fromJSON(content(getdata, type = "text")) :
unexpected character '<'任何帮助都是非常感谢的。
发布于 2017-04-18 03:34:02
auth <- add_headers(apiAccessKeyId = "username", apiSecretAccessKey = "password")
body = paste('{
"Format": "csv",
"Name": "test",
"Query": "select * from invoice",
"Status": "Processing",
"Zip": false
}')
getdata <- POST("https://rest.zuora.com/v1/object/export", auth, body = body)
r <- fromJSON(content(getdata, type = "text"))https://stackoverflow.com/questions/43454894
复制相似问题