You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Matt Aimonetti (JIRA)" <ji...@apache.org> on 2009/03/12 01:51:50 UTC

[jira] Created: (COUCHDB-289) _all_docs should support both GET and POST

_all_docs should support both GET and POST
------------------------------------------

                 Key: COUCHDB-289
                 URL: https://issues.apache.org/jira/browse/COUCHDB-289
             Project: CouchDB
          Issue Type: Improvement
    Affects Versions: 0.10
            Reporter: Matt Aimonetti


As of 0.9, if you want to query multiple documents at once and load them, you have to do: 

'POST' /my_db/_all_docs?include_docs=true and pass the document ids.

The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (COUCHDB-289) _all_docs should support both GET and POST

Posted by Patrick Aljord <pa...@gmail.com>.
> The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.
>

I think it is planed to add that, just waiting for someone to write the patch :)
But say, in a merb app, you could still cache the docs returned by the POST no?

[jira] Updated: (COUCHDB-289) _all_docs should support both GET and POST

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Kocoloski updated COUCHDB-289:
-----------------------------------

    Component/s: HTTP Interface

I'm +1 on this.  Also if the keys are passed in the query-string it gives us a chance to throw '414 Request-URI Too Long".  We should never pass up the opportunity to correctly use an obscure HTTP status code :-)

> _all_docs should support both GET and POST
> ------------------------------------------
>
>                 Key: COUCHDB-289
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-289
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>    Affects Versions: 0.10
>            Reporter: Matt Aimonetti
>
> As of 0.9, if you want to query multiple documents at once and load them, you have to do: 
> 'POST' /my_db/_all_docs?include_docs=true and pass the document ids.
> The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-289) _all_docs should support both GET and POST

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-289:
--------------------------------------

    Skill Level: New Contributors Level (Easy)

> _all_docs should support both GET and POST
> ------------------------------------------
>
>                 Key: COUCHDB-289
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-289
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>    Affects Versions: 0.10
>            Reporter: Matt Aimonetti
>
> As of 0.9, if you want to query multiple documents at once and load them, you have to do: 
> 'POST' /my_db/_all_docs?include_docs=true and pass the document ids.
> The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-289) _all_docs should support both GET and POST

Posted by "Dipesh Patel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801251#action_12801251 ] 

Dipesh Patel commented on COUCHDB-289:
--------------------------------------

I'm going to have a stab at this if there are no objections.

Dip

> _all_docs should support both GET and POST
> ------------------------------------------
>
>                 Key: COUCHDB-289
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-289
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>    Affects Versions: 0.10
>            Reporter: Matt Aimonetti
>
> As of 0.9, if you want to query multiple documents at once and load them, you have to do: 
> 'POST' /my_db/_all_docs?include_docs=true and pass the document ids.
> The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-289) _all_docs should support both GET and POST

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802557#action_12802557 ] 

Chris Anderson commented on COUCHDB-289:
----------------------------------------

Not an objection, but something to bear in mind.

Right now POSTing the keys to views kinda sucks, because it's so limited.

We'd like to change the API so that you post an object the specifies a list of queries, not just keys:

{
"queries" : [
{
  "startkey" : "foo",
  "limit" : 5,
 },
{
  "startkey" : "baz",
  "limit" : 5,
}
]
}

which gives the current functionality but also much more flexibility. It's also harder to compress into get params, but not impossible.

Anyway, just a heads up.


> _all_docs should support both GET and POST
> ------------------------------------------
>
>                 Key: COUCHDB-289
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-289
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>    Affects Versions: 0.10
>            Reporter: Matt Aimonetti
>
> As of 0.9, if you want to query multiple documents at once and load them, you have to do: 
> 'POST' /my_db/_all_docs?include_docs=true and pass the document ids.
> The problem with that approach is that the requests can't be cached. Being to make a GET request (with the obvious limitations) would make a lot of sense.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.