Reputation: 275
I have one application with an endpoint that I want to link with a second application, so that when I create a new instance in a table in the second application, it will also be created in a table in the first application. How do I create the HTTP Request in the second application? I have the url of the second application
Upvotes: 0
Views: 149
Reputation: 2381
As far as I know, Rails doesn't have built-in functionality for that (beyond the limited support in Ruby's standard libraries), but it's easy to add with one of these HTTP client gems. I've had decent results with Faraday. One nice thing about Faraday is that it's easy to add custom authentication middleware to it, stuff that preprocesses the request to, say, add an HTTP header signing it. From the sound of it, you'll need that eventually.
Upvotes: 1