Displaying 20 results from an estimated 100000 matches similar to: "POST request with custom headers"
2008 Sep 07
8
How do I make an API?
Hi!
I''m a new developer trying to get into Ruby on Rails. My team is
developing an iPhone application that wants to call our Ruby on Rails
web-end to store and retrieve data. I''ve looked on the web and in this
forum but the only things I could find were dealing with scaffolding,
which a) didn''t solve the problem clearly for me and b) we''re not
using
2007 Jul 04
1
Edge Rails required for ActiveResource
Just wanted to make sure I''m not missing anything here... I''m trying
to use ActiveResource and I was trying to avoid using Edge Rails.
However, since ActiveResource depends on the edge version of
activesupport, I appear to be stuck going edge... have flailed around
for a while trying to get ActiveResource to work with 1.2.3 but it
just ain''t happening. Am I right? Gotta
2009 May 28
0
Re: ActiveResource as API test rig? Two jsons?
bump...
On Wed, May 20, 2009 at 3:57 PM, Marc Byrd <dr.marc.byrd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I''m using ActiveResource as an API test rig for an API we''re developing for
> our PHP app - the goal being to validate that we''re following some
> externally validated conventions for ReSTful API and that we can support at
>
2008 Apr 23
0
Upload a file using Net:HTTP multipart post or ActiveResource
Hi Guys,
I am trying to upload a file to a rails server using a ruby script.
http://pastie.org/185380
I verified the parameters of the Net:HTTP post request and they seem
to be right. However the recipient, mongre,l shows following message
in console and the parameters sent, the file data, is all corrupted.
oh and one very weird thing happened. the console running mongrel
looks like following
2007 Jun 21
2
does activeresource only work with edge?
hey all,
I''ve just installed the activeresource gem and it wasn''t working, so I
did gem update rails and it worked. But now I have rails-1.2.3.6906
and I think this is edge right? Is there a way to work on regular
rails 1.2.3 with activeresource?
thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to
2007 Mar 29
0
using certificates with ActiveResource
I''m trying to hack ActiveResource to use a self-signed certificate when
connecting to my RESTful rails app (seems like a pretty glaring hole
that it doesn''t offer this out of the box... though I guess it is alpha
software).
I started out going through the ActiveResource code looking for
somewhere I could set the cert and key. Didn''t find it, so I took the
approach
2006 Sep 01
2
Uninitialized constant w/ ActiveResource
Howdy,
I had an application perfect for ActiveResource, which I do realize is not
finished.
Anyway, I froze my app to edge and then defined a class:
class Address < ActiveResource::Base
self.site = "http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long"
End
I tried to use it from the console but I get the trace below.
It appears it can''t
2008 Aug 20
0
activeresource: self.prefix = .../:id/... (need to set :id?)
Hi All
As I mentioned in my title I''m using activeresource and the model I''m
using has the following prefix
self.prefix = ''/institute/:institute_id/services/:service_id/''
All this is great, however I''m now in a situation where I need to save
the model, but it translate the prefix as follows
/providers/983783784/services//appointments/234234234
So,
2008 Sep 28
4
ActiveResource and InvalidAuthenticityToken exception
Hi,
I have a Rails 2.1.1 web app, and a Rails 2.1.1 app acting as a client
by using ActiveResource.
From the client, I can find, create, and update resources owned by the
web app.
However, I can not delete any. Calling the .destroy method in
ActiveResource generates a 422 from the web app.
Not sure why this would be the case, since I thought
protect_from_forgery only protects HTML and JS
2010 Dec 31
9
Headers in ActiveResource
I am creating a rails app that is a gui wraping a restful web service
that uses a websso for authentication. This websso sets a series of
headers that I need to pass from the request to the
ActiveResource.find methods. As this is stuff like username etc it is
going to be different for each request. I can find examples on how to
set headers for all requests not just one.
Does anyone know of a way
2007 Sep 22
4
ActiveResource, find(1) works but no find(:all)
Hi,
I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error
[1]. Fuser is declared here [2]. Do you know what''s happening? Thanks.
[1]
ActiveResource::ServerError: Failed with 500 Internal Server Error
from
/.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in
`handle_response''
from
2006 Sep 01
2
Include ActiveResource
Hello,
I want to give ActiveResource a spin.
I have all the code checked out from SVN in vendor/rails (yes, including
ActiveResource).
I''m trying to make sure it gets loaded.
I did this in environment.rb:
config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/activeresource/lib )
Unfortunately I still can''t use it. I have an ActiveResource derived model,
Address:
class
2007 May 14
6
ActiveResource and RESful edit
Hi
I''d like to know how to have ActiveResource generate a URL for the
/teams/1/edit
type of resource.
I''ve got custom_methods.rb and have used
Team.find(1).get(:edit)
This generates
http://localhost:xxxx/teams/1/edit.xml
But all I get returned is a hash of the attributes (in this case of
team 1), rather than an object of team 1.
In other words the
2007 Jan 18
2
How to use API from AWS -- help!
I''m building a users web service (direct dispatching) that will (I hope)
allow several other applications to manage the same pool of users. Plus
it will act as a single-sign-on solution for what I''m doing. But I''m
having difficulty accessing the UserAPI. Here''s what I''ve done so far:
$> rails usermanagement
- "usermanagement" is the
2007 Jan 05
0
ActiveResource cache using memcache-client
I''ve created this class that overrides methods for
find,delete,destroy,reload, and save in activeresource. The code
populates a local memcache daemon and uses that cache for future find
requests. I''m posting it here to get whatever feedback people have.
I''m most interested in the pro/con of inheritance over a mixin and how
such a module might be tested.
$ cat
2007 Dec 27
6
ActiveResource and (polymorphic) associations
Hi,
I''m just playing with ActiveResource and I did''nt find anything about
the support of (polymorphic) associations.
Is there a support at all?
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Apr 18
1
RESTful posting
I''m implementing a Rails front end to a Windows system by using RESTful
web services to send data back and forth. Luckyly all the business
objects in the Windows system know how to serialize themselves into XML
so it''s not too complicated.
But when I looked at the XML that gets sent back to the service in a
POST when you do a myresource.save, all the fields that had underscores
2007 Aug 22
1
ActiveResource find method and restful controllers.
Hi,
What''s the best way to add support for the activeresource find method
in the controllers in my rails app?
As I understand it when you invoke something like:
Person.find(:all, :params => {:name = ''toby''})
this generates a request of:
GET /people.xml?name=toby
Does this mean that in my index method in PeopleController in my rails
app I have params[name] set to
2008 Dec 02
2
ActiveResource - xml and json format return different results
Hi,
I''m using Rails 2.1.2. and I wanted to switch ActiveResource format to
JSON and thought that it will work smoothly, but unfortunately it
wasn''t the case.
XML and JSON formats generate different objects:
XML version
#<User:0xb7658440 @prefix_options={}, @attributes={"created_at"=>Mon
Nov 28 11...}>
JSON version
#<User:0xb746af5c @prefix_options={},
2008 Jun 26
0
ActiveResource - 404 when resources use the :as parameter
Hi,
I have another question about ActiveResource.
In a REST server I have resources defined with the :as parameter, like:
map.resources :alerts, :as => ''alertas''
But when I try an ActiveResource client to access that, it tries to
access ''/alerts.xml'', which returns a 404.
I tried defining the resource on the client too, but it seems it doesn''t