Making a post request from a sinatra app to a rails app
问题 I need to send a POST request from a sinatra app to a rails app which would return back some json. Im testing this functionality locally. The urls are as follows: Rails app : railsapp.mydomain.com/api/v1.json Sinatra app: sinatraapp.mydomain.com On localhost, the urls are: Rails app: localhost:3000/api/v1.json Sinatra app:localhost 3001 In my sinatra app running locally, i have the following code to make the POST request locally $("#submit").click(function(){ $.post("http://localhost:3000/api