使用httr库的POST函数时出现403错误。
在此处加载Json
abc <- '{
"internalId": "RAttribute",
"description": {
"language": "en",
"short": "R Attribute",
"long": null
},
"dataType": "string",
"dimension1": null,
"dimension2": null
}'
呼叫后功能
PResponse <- POST(CreateAttributeURL,
auth = list(username = username, password = password),
header = list("x-csrf-token" = csrf, Accept = "text/json", Accept = "application/json"),
body = abc
)
响应:
> print(PResponse)
Response
Date: 2019-02-20 09:59
Status: 403
Content-Type: <unknown>
Size: 9 B
<BINARY BODY>
NULL
调用POST函数时出现错误。 我怀疑POST调用不正确。 在此先感谢!