Hi,
i am trying to connect and get data from an OData service. There are many tables available.
searching on the web i tried something as follow:
response <- GET("link", authenticate('user','pw')) #there is no error which means i am able to connect to the link.
response contains a lot informatin, so i am trying to extract my tables from it:
resultTxt <- content(response, "text")
resultJson <- fromJSON(resultTxt, flatten = TRUE)
it gives me a list containing only the names of the tables i am trying to get.
I was wondering if any of you knows how to get data tables from OData
thanks
Hi @momo1,
Welcome to the RStudio Community Forum.
It's impossible to reproduce your problem without knowing exactly what you are trying to download from the URL. However, I followed your workflow using an example from the jsonlite::fromJSON() function to access a public dataset and it worked.
# Not run as the output is voluminous
library(httr)
library(jsonlite)
response <- GET("https://api.github.com/users/hadley/repos")
resultTxt <- content(response, "text")
resultJson <- fromJSON(resultTxt, flatten = TRUE)
names(resultJson)
str(resultJson)