我正在尝试从R调用API,但是我却以某种方式收到状态403消息。
CSV到JSON转换:
x<- list(internalId = Attributes$internalId, description = list(language = Attributes$description.language,
short = Attributes$description.short,
long = Attributes$description.long), dimension1 = Attributes$dimension1)
请在下面找到POST的代码:
PResponse <- POST(POSTURL,
config = list(authenticate(username, password),
add_headers("x-csrf-token"=csrf,"Accept"="application/json")),
body = cat(RJSONIO::toJSON(x))
)