Snaggy
2009-Sep-17 13:17 UTC
"Only get, put, and delete requests are allowed" on an XML request... why??
My app on rails 2.3.2 has a standard scaffold for a resource "thing" I try to create a new "thing" like this: curl -d ''<thing><name>pallone</name></thing>'' ''http://0.0.0.0:3000/ things/1'' -d ''_method=put'' -H ''Content-type: application/xml'' and I get the error "Only get, put, and delete requests are allowed" why? It''s driving me crazy... (My app is accessed by a flex3 frontend that speaks XML, and can only send get and post requests)
Daniel Schierbeck
2009-Sep-17 15:39 UTC
Re: "Only get, put, and delete requests are allowed" on an XML request... why??
Hi, First of all, this is the "core" group, meant for discussions on the development and direction of Rails itself, not a help forum -- there''s a dedicated group for that purpose. Second, you should issue your POST to "/things", not "/things/1". Cheers, Daniel On Thu, Sep 17, 2009 at 3:17 PM, Snaggy <l.cioria@gmail.com> wrote:> > My app on rails 2.3.2 has a standard scaffold for a resource "thing" > I try to create a new "thing" like this: > > curl -d ''<thing><name>pallone</name></thing>'' ''http://0.0.0.0:3000/ > things/1'' -d ''_method=put'' -H ''Content-type: application/xml'' > > and I get the error "Only get, put, and delete requests are allowed" > why? It''s driving me crazy... > > (My app is accessed by a flex3 frontend that speaks XML, and can only > send get and post requests) > > > >
Snaggy
2009-Sep-17 17:04 UTC
Re: "Only get, put, and delete requests are allowed" on an XML request... why??
sorry I didn''t realize I was in the wrong forum.. thanks. On Sep 17, 5:39 pm, Daniel Schierbeck <daniel.schierb...@gmail.com> wrote:> Hi, > > First of all, this is the "core" group, meant for discussions on the > development and direction of Rails itself, not a help forum -- there''s > a dedicated group for that purpose. > > Second, you should issue your POST to "/things", not "/things/1". > > Cheers, > Daniel > > On Thu, Sep 17, 2009 at 3:17 PM, Snaggy <l.cio...@gmail.com> wrote: > > > My app on rails 2.3.2 has a standard scaffold for a resource "thing" > > I try to create a new "thing" like this: > > > curl -d ''<thing><name>pallone</name></thing>'' ''http://0.0.0.0:3000/ > > things/1'' -d ''_method=put'' -H ''Content-type: application/xml'' > > > and I get the error "Only get, put, and delete requests are allowed" > > why? It''s driving me crazy... > > > (My app is accessed by a flex3 frontend that speaks XML, and can only > > send get and post requests)