In rails, can I get a form submit to send the info in the form both to an external URL, and also post to my own server, all with one click from the user?
Asked
Active
Viewed 540 times
2 Answers
0
In the create or update actions in the controller, after the save action:
require 'net/http'
Net::HTTP.get('www.example.com', '/index.html?'+params)

Michael Durrant
- 93,410
- 97
- 333
- 497
0
You have to do it yourself, preferably by triggering the external request after you're done with your procedure, hopefully using message queuing.

ChuckE
- 5,610
- 4
- 31
- 59