Hi,
I am trying to implement Rest Api for a sample application for learning
purpose. But when I try to make a "GET" request through the RestClient
it
is showing error as
RestClient::ResourceNotFound in UsersController#index
def index
uri = "#{API_BASE_URL}/users.json" # specifying json format in the
URl
rest_resource = RestClient::Resource.new(uri, USERNAME, PASSWORD) # It
will create new rest-client resource so that we can call different methods
of it
users = rest_resource.get
@users = JSON.parse(users, :symbolize_names => true) # we will convert
the return data into array of hash.see json data parsing here
end
Please help.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/d494c7a7-ebb2-4996-a0a2-7250a26558fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.