0

I have a rails app running locally on port 3000.

From an app on Vagrant:

Requests::post( 'http://0.0.0.0:3000', $header, $payload ); 

Response:

'Cannot connect to host' 

Note that when I run the same code out of the context of Vagrant, it works perfectly. Note also that Vagrant has no problem POSTing to a version of the same rails app when it is not hosted locally.

1 Answer 1

1

The solution was to call the API using the IP Address, ie:

http://50.19.293.12:3000 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.