James Willcox
James Willcox

Reputation: 631

R server requests for json

I haven't been able to find an example yet but is there a way to use R to send requests to a server? I know of packages that will allow you to convert data to and from JSON files. Essentially I want to request certain data from a server I have set up, that server will then compile a JSON file depending on what I have requested and then R will download the JSON file and then convert it into an R friendly format. I know how to download a JSON file from the server its just the request part that is the issue. Can anyone give an example?

Thanks;

For more info: I'm building a Shiny web app in R. I also have the packages rjson and RJSONIO

Upvotes: 0

Views: 59

Answers (1)

Traveling Tech Guy
Traveling Tech Guy

Reputation: 27811

You can use a package like httpRequest to send/receive request from server, including JSON payload. This package has documentation in the form of a PDF.

PS: there may be newer packages available, but this one works for me. Feel free to look for one that'd fit your needs.

Upvotes: 1

Related Questions