0
I set up a simple API in Rails, it only reads the database, and returns the JSON according to the request.
However, I went to test the API, making a request with another device, connected via wireless, and could not get the JSON as a response. I looked up the bug on the Internet, and it looks like it’s something to do with protect_from_forgery
, But even though I mentioned it, I couldn’t.
So the API doesn’t have much to do with security, for example, requiring tokens and things like that, because I’m a beginner, and I don’t really know how to develop this part.
Follow the github link to the project: https://github.com/ViniciusVenancio/fatec-api
So, I make a request on another machine, my API, localhost, and I can’t. It says that the rejected connection or timeout exceeded.
– Vinícius Venancio dos Santos
And it also seems that it would be something related to the token, because the request does not send tokens
– Vinícius Venancio dos Santos
But your application works on localhost without token?
– Alex Takitani
Yes, normal. It’s just that, I create a ruby file, I make the request, because actually, I’m going to use this API, to return data to mobile devices, so I don’t get answers
– Vinícius Venancio dos Santos