whichdigital / active-rest-client

ActiveRestClient API Client
https://rubygems.org/gems/active_rest_client
MIT License
385 stars 44 forks source link

cannot achieve get request #121

Open lethunder opened 8 years ago

lethunder commented 8 years ago

Hello, i'm trying to achived a simple get request but i have this error comming back ActiveRestClient::HTTPForbiddenClientException

this is my model class Equipment < ActiveRestClient::Base base_url Rails.application.config.api_server_url

get :find, "/cmitel/get_equipments" end

the request is sent to the backend and return json.

I'm surely doing something wrong. Need help. Thanks in advance

andyjeffries commented 8 years ago

ActiveRestClient::HTTPForbiddenClientException is the exception raised if the server returns a 403 header.

lethunder commented 8 years ago

Hello Andy, i'm sorry but i don't understand what you mean. capture

andyjeffries commented 8 years ago

If you enable verbose mode, you'll see the entire request and response in the Rails log. You'll see there exactly what's going to the server (so you can compare it with the scribbled out request above) and see what the server is responding with. If the request is the same, you may need to contact the API server owners.

lethunder commented 8 years ago

Hello, i had an issu with permissions. Everything is OK now