I have the following code
library(RCurl)
library(RJSONIO)
httpPOST("https://api.ibm.com/watsonanalytics/run/data/v1/datasets",
content= c("description"="Test1",
"name"="Test1"),
.opts = list(httpheader = c('Content-Type' = 'application/json',
'Accept' = 'application/json',
'X-IBM-Client-Secret' = '123',
'X-IBM-Client-Id' = '123',
'Authorization: Bearer'="")))
and I'm trying to translate this code into R program, but I end up with the following error:
curl -v -X POST -H "X-IBM-Client-Id:YOUR_CLIENT_ID" -H "X-IBM-Client-Secret:YOUR_CLIENT_SECRET" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type:application/json" -H "Accept:application/json" https://api.ibm.com/watsonanalytics/run/data/v1/datasets -d '{ "description" :"1234" , "name" :"1234" }