You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Mario Scheliga <ma...@sourcegarden.de> on 2010/02/28 15:34:42 UTC

Show Functions

Dear Users,

is it possible to POST Show-Functions? If yes how the docId has to be  
submitted?

--
Sourcegarden GmbH HR: B-104357
Steuernummer: 37/167/21214 USt-ID: DE814784953
Geschaeftsfuehrer: Mario Scheliga, Rene Otto
Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
Schoenhauser Allee 51, 10437 Berlin


Re: Show Functions

Posted by Mario Scheliga <ma...@sourcegarden.de>.
thx alot. that helped me out ;-)

greetz
mario

Am 01.03.2010 um 23:07 schrieb J Chris Anderson:

>
> On Mar 1, 2010, at 2:04 PM, Mario Scheliga wrote:
>
>> Hi Chris,
>>
>> i thought this would be easy, but still get an error like this:
>>
>> curl -vX POST http://127.0.0.1:5984/todoapp/_design/todoapp/_show/display/27e2f1a54606f0883e2f8891b5bf500f
>> * About to connect() to 127.0.0.1 port 5984 (#0)
>> *   Trying 127.0.0.1... connected
>> * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
>>> POST /todoapp/_design/todoapp/_show/display/ 
>>> 27e2f1a54606f0883e2f8891b5bf500f HTTP/1.1
>>> User-Agent: curl/7.19.7 (i386-apple-darwin9.8.0) libcurl/7.19.7  
>>> zlib/1.2.3
>>> Host: 127.0.0.1:5984
>>> Accept: */*
>>>
>> < HTTP/1.1 405 Method Not Allowed
>> < Server: CouchDB/0.10.0 (Erlang OTP/R13B)
>> < Date: Mon, 01 Mar 2010 22:03:23 GMT
>> < Content-Type: text/plain;charset=utf-8
>> < Content-Length: 69
>> < Cache-Control: must-revalidate
>> < Allow: GET,POST,HEAD
>> <
>> {"error":"method_not_allowed","reason":"Only GET,POST,HEAD allowed"}
>>
>> am i doing something wrong? perhaps i can't see....
>> GET-Method works fine ....
>>
>
> Gotcha. I was looking at the source code for 0.11. It maybe that  
> 0.10 is restricted here in a way that the new version is not.
>
> Chris
>
>> greets
>> mario
>>
>>
>>
>> Am 01.03.2010 um 17:47 schrieb J Chris Anderson:
>>
>>>
>>> On Feb 28, 2010, at 6:34 AM, Mario Scheliga wrote:
>>>
>>>> Dear Users,
>>>>
>>>> is it possible to POST Show-Functions? If yes how the docId has  
>>>> to be submitted?
>>>
>>> yes. just like a GET but POST. eg the path can be
>>>
>>> POST /db/_design/foo/_show/bar/docid
>>>
>>>>
>>>> --
>>>> Sourcegarden GmbH HR: B-104357
>>>> Steuernummer: 37/167/21214 USt-ID: DE814784953
>>>> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
>>>> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
>>>> Schoenhauser Allee 51, 10437 Berlin
>>>>
>>>
>>
>>
>> --
>> Sourcegarden GmbH HR: B-104357
>> Steuernummer: 37/167/21214 USt-ID: DE814784953
>> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
>> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
>> Schoenhauser Allee 51, 10437 Berlin
>>
>


--
Sourcegarden GmbH HR: B-104357
Steuernummer: 37/167/21214 USt-ID: DE814784953
Geschaeftsfuehrer: Mario Scheliga, Rene Otto
Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
Schoenhauser Allee 51, 10437 Berlin


Re: Show Functions

Posted by J Chris Anderson <jc...@gmail.com>.
On Mar 1, 2010, at 2:04 PM, Mario Scheliga wrote:

> Hi Chris,
> 
> i thought this would be easy, but still get an error like this:
> 
> curl -vX POST http://127.0.0.1:5984/todoapp/_design/todoapp/_show/display/27e2f1a54606f0883e2f8891b5bf500f
> * About to connect() to 127.0.0.1 port 5984 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
> > POST /todoapp/_design/todoapp/_show/display/27e2f1a54606f0883e2f8891b5bf500f HTTP/1.1
> > User-Agent: curl/7.19.7 (i386-apple-darwin9.8.0) libcurl/7.19.7 zlib/1.2.3
> > Host: 127.0.0.1:5984
> > Accept: */*
> >
> < HTTP/1.1 405 Method Not Allowed
> < Server: CouchDB/0.10.0 (Erlang OTP/R13B)
> < Date: Mon, 01 Mar 2010 22:03:23 GMT
> < Content-Type: text/plain;charset=utf-8
> < Content-Length: 69
> < Cache-Control: must-revalidate
> < Allow: GET,POST,HEAD
> <
> {"error":"method_not_allowed","reason":"Only GET,POST,HEAD allowed"}
> 
> am i doing something wrong? perhaps i can't see....
> GET-Method works fine ....
> 

Gotcha. I was looking at the source code for 0.11. It maybe that 0.10 is restricted here in a way that the new version is not.

Chris

> greets
> mario
> 
> 
> 
> Am 01.03.2010 um 17:47 schrieb J Chris Anderson:
> 
>> 
>> On Feb 28, 2010, at 6:34 AM, Mario Scheliga wrote:
>> 
>>> Dear Users,
>>> 
>>> is it possible to POST Show-Functions? If yes how the docId has to be submitted?
>> 
>> yes. just like a GET but POST. eg the path can be
>> 
>> POST /db/_design/foo/_show/bar/docid
>> 
>>> 
>>> --
>>> Sourcegarden GmbH HR: B-104357
>>> Steuernummer: 37/167/21214 USt-ID: DE814784953
>>> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
>>> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
>>> Schoenhauser Allee 51, 10437 Berlin
>>> 
>> 
> 
> 
> --
> Sourcegarden GmbH HR: B-104357
> Steuernummer: 37/167/21214 USt-ID: DE814784953
> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
> Schoenhauser Allee 51, 10437 Berlin
> 


Re: Show Functions

Posted by Mario Scheliga <ma...@sourcegarden.de>.
Hi Chris,

i thought this would be easy, but still get an error like this:

curl -vX POST http://127.0.0.1:5984/todoapp/_design/todoapp/_show/display/27e2f1a54606f0883e2f8891b5bf500f
* About to connect() to 127.0.0.1 port 5984 (#0)
*   Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
 > POST /todoapp/_design/todoapp/_show/display/ 
27e2f1a54606f0883e2f8891b5bf500f HTTP/1.1
 > User-Agent: curl/7.19.7 (i386-apple-darwin9.8.0) libcurl/7.19.7  
zlib/1.2.3
 > Host: 127.0.0.1:5984
 > Accept: */*
 >
< HTTP/1.1 405 Method Not Allowed
< Server: CouchDB/0.10.0 (Erlang OTP/R13B)
< Date: Mon, 01 Mar 2010 22:03:23 GMT
< Content-Type: text/plain;charset=utf-8
< Content-Length: 69
< Cache-Control: must-revalidate
< Allow: GET,POST,HEAD
<
{"error":"method_not_allowed","reason":"Only GET,POST,HEAD allowed"}

am i doing something wrong? perhaps i can't see....
GET-Method works fine ....

greets
mario



Am 01.03.2010 um 17:47 schrieb J Chris Anderson:

>
> On Feb 28, 2010, at 6:34 AM, Mario Scheliga wrote:
>
>> Dear Users,
>>
>> is it possible to POST Show-Functions? If yes how the docId has to  
>> be submitted?
>
> yes. just like a GET but POST. eg the path can be
>
> POST /db/_design/foo/_show/bar/docid
>
>>
>> --
>> Sourcegarden GmbH HR: B-104357
>> Steuernummer: 37/167/21214 USt-ID: DE814784953
>> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
>> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
>> Schoenhauser Allee 51, 10437 Berlin
>>
>


--
Sourcegarden GmbH HR: B-104357
Steuernummer: 37/167/21214 USt-ID: DE814784953
Geschaeftsfuehrer: Mario Scheliga, Rene Otto
Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
Schoenhauser Allee 51, 10437 Berlin


Re: Show Functions

Posted by J Chris Anderson <jc...@gmail.com>.
On Feb 28, 2010, at 6:34 AM, Mario Scheliga wrote:

> Dear Users,
> 
> is it possible to POST Show-Functions? If yes how the docId has to be submitted?

yes. just like a GET but POST. eg the path can be

POST /db/_design/foo/_show/bar/docid

> 
> --
> Sourcegarden GmbH HR: B-104357
> Steuernummer: 37/167/21214 USt-ID: DE814784953
> Geschaeftsfuehrer: Mario Scheliga, Rene Otto
> Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929
> Schoenhauser Allee 51, 10437 Berlin
>