Reputation:
I am using a Clear bit gem. How do I call the external API in the Rails application and send data back forth without the default database to store data.I need to build a form like the Clear bit form and send data back and forth.Do I need a controller and model for the same?
Upvotes: 0
Views: 4267
Reputation: 1385
To call any external url, you should require rest-client
gem.
url = "https://...."
body = RestClient.get(url)
JSON.parse(body)
You have to check the rest-client documentation
Upvotes: 6