I've seen this work a few times by loading the index and seeing the response outputted proving that it does indeed authenticate and return the response from the API. However it repeatable will become stuck... and then fall into the StandardError with a timeout exception:
ApiController - RestClient::Exceptions::ReadTimeout: Timed out reading data from server/Users/cameron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rest-client-2.1.0/lib/restclient/request.rb:751:in `rescue in transmit'
This API isn't doing anything with databases and is just returning simple JSON, so not sure why it does this...
Any ideas what could be the cause? And why it works sometimes, but then will fail with a timeout?
I'm experimenting with this gem as an alternative to secure some API's in two of our Rails apps that talk to each other.
An example method that makes a request might look like:
access_id
andsecret_key
have been hard-coded for the purpose of testing.And then in the API itself:
I've seen this work a few times by loading the
index
and seeing the response outputted proving that it does indeed authenticate and return the response from the API. However it repeatable will become stuck... and then fall into theStandardError
with a timeout exception:This API isn't doing anything with databases and is just returning simple JSON, so not sure why it does this...
Any ideas what could be the cause? And why it works sometimes, but then will fail with a timeout?