I am trying to get this API (that works in shell) to work within R:
curl -H 'Content-Type: text/json' -d '{"Symbols":["FLDB","APOE"]}' https://toppgene.cchmc.org/API/lookup
I followed this example and wrote this R studio:
library(RCurl)
library(RJSONIO)
postForm("https://toppgene.cchmc.org/API/lookup",
.opts = list(postfields = toJSON(list(Symbols = "[", "FLDB", "APOE", "]")),
httpheader = c('Content-Type' = 'text/json')))
and I get an internal server error. I have all the packages installed and I don't think there is a syntax error.
Any help on this? Thanks.