Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 80192 invoked from network); 6 Jun 2010 21:02:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Jun 2010 21:02:14 -0000 Received: (qmail 2533 invoked by uid 500); 6 Jun 2010 21:02:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 2383 invoked by uid 500); 6 Jun 2010 21:02:12 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 2375 invoked by uid 99); 6 Jun 2010 21:02:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jun 2010 21:02:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of darran.m.white@googlemail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-ww0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Jun 2010 21:02:05 +0000 Received: by wwb31 with SMTP id 31so2950331wwb.11 for ; Sun, 06 Jun 2010 14:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=wRBjZ5cQsClXQpQH/pa+IjcGG7E4XnKBD4O3tc6EUgg=; b=gDF4FEJqDxoRCanf1XJ+05V/6NFKihSlNPocyJy2OT6cNbtR1ak4I3CJQsrp0IMA4X GQ9JnTmmZa021CcLHZ5g6kGbOqNbOdkjVWqPHWeOl5KLPALgM1CsgTc03cz9b2A524vY AVhWwOekSYvb0gvuUCxJSWwOl4RIAj1mWBUdU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kZo7LSgxP4ekbPGFRlaEPsOL7whdDqfaPGhPCyTMyXSyAp2efvYeTw0qWoMCeHdvH3 DHJWqiW16G7btr5t2CGwyxaIt8Mc5OEHU/ttb9XggEvGVjpnwhSVk7QrLAUU6KRswFa5 S6nOYZUBMXIJBDJjoQ06nVhLAJ7bt+e1eE+MY= MIME-Version: 1.0 Received: by 10.216.174.142 with SMTP id x14mr1705143wel.8.1275858104928; Sun, 06 Jun 2010 14:01:44 -0700 (PDT) Received: by 10.216.28.212 with HTTP; Sun, 6 Jun 2010 14:01:44 -0700 (PDT) Date: Sun, 6 Jun 2010 22:01:44 +0100 Message-ID: Subject: view request using keys: as content of request From: Darran White To: CouchDB users mailing list Content-Type: multipart/alternative; boundary=0016e6541d8820ca83048862dd01 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6541d8820ca83048862dd01 Content-Type: text/plain; charset=ISO-8859-1 Hi, I`m trying to request a view using as the content of the view request where the key is an array with a userName and a document id. I`m using POST to a view I`ve created with the URL /cgmtest/_design/main/_view/getJobTaskByEmployeeAndJobId The content of the view is {"keys":["admin","d54561778b60a274a98c6e9bfd0100a2"]} However no documents are returned from the request. If I however just use a URL like /cgmtest/_design/main/_view/getJobTaskByEmployeeAndJobId?key=[%22admin%22,%22d54561778b60a274a98c6e9bfd0100a2%22] I do get a document returned. Does anyone know why the POST version doesn`t return a document? Heres the output from my logfile which shows the requests 21:51:36.398 [main] DEBUG o.a.h.i.c.DefaultClientConnection - Sending request: POST /cgmtest/_design/main/_view/getJobTaskByEmployeeAndJobId HTTP/1.1 21:51:36.401 [main] DEBUG org.apache.http.wire - >> "POST /cgmtest/_design/main/_view/getJobTaskByEmployeeAndJobId HTTP/1.1[EOL]" 21:51:36.403 [main] DEBUG org.apache.http.wire - >> "Content-Type: text/json[EOL]" 21:51:36.405 [main] DEBUG org.apache.http.wire - >> "Content-Length: 53[EOL]" 21:51:36.407 [main] DEBUG org.apache.http.wire - >> "Host: 127.0.0.1:5984 [EOL]" 21:51:36.409 [main] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[EOL]" 21:51:36.410 [main] DEBUG org.apache.http.wire - >> "User-Agent: Apache-HttpClient/4.0.1 (java 1.5)[EOL]" 21:51:36.412 [main] DEBUG org.apache.http.wire - >> "Expect: 100-Continue[EOL]" 21:51:36.414 [main] DEBUG org.apache.http.wire - >> "[EOL]" 21:51:36.415 [main] DEBUG org.apache.http.headers - >> POST /cgmtest/_design/main/_view/getJobTaskByEmployeeAndJobId HTTP/1.1 21:51:36.417 [main] DEBUG org.apache.http.headers - >> Content-Type: text/json 21:51:36.419 [main] DEBUG org.apache.http.headers - >> Content-Length: 53 21:51:36.420 [main] DEBUG org.apache.http.headers - >> Host: 127.0.0.1:5984 21:51:36.421 [main] DEBUG org.apache.http.headers - >> Connection: Keep-Alive 21:51:36.423 [main] DEBUG org.apache.http.headers - >> User-Agent: Apache-HttpClient/4.0.1 (java 1.5) 21:51:36.425 [main] DEBUG org.apache.http.headers - >> Expect: 100-Continue 21:51:36.431 [main] DEBUG org.apache.http.wire - << "HTTP/1.1 100 Continue[EOL]" 21:51:36.433 [main] DEBUG org.apache.http.wire - << "[EOL]" 21:51:36.434 [main] DEBUG o.a.h.i.c.DefaultClientConnection - Receiving response: HTTP/1.1 100 Continue 21:51:36.436 [main] DEBUG org.apache.http.headers - << HTTP/1.1 100 Continue 21:51:36.438 [main] DEBUG org.apache.http.wire - >> "{"keys":["admin","d54561778b60a274a98c6e9bfd0100a2"]}" 21:51:36.495 [main] DEBUG org.apache.http.wire - << "HTTP/1.1 200 OK[EOL]" 21:51:36.497 [main] DEBUG org.apache.http.wire - << "Server: CouchDB/0.11.0 (Erlang OTP/R13B)[EOL]" 21:51:36.498 [main] DEBUG org.apache.http.wire - << "Date: Sun, 06 Jun 2010 20:51:36 GMT[EOL]" 21:51:36.501 [main] DEBUG org.apache.http.wire - << "Content-Type: text/plain;charset=utf-8[EOL]" 21:51:36.503 [main] DEBUG org.apache.http.wire - << "Content-Length: 38[EOL]" 21:51:36.504 [main] DEBUG org.apache.http.wire - << "Cache-Control: must-revalidate[EOL]" 21:51:36.506 [main] DEBUG org.apache.http.wire - << "[EOL]" 21:51:36.507 [main] DEBUG o.a.h.i.c.DefaultClientConnection - Receiving response: HTTP/1.1 200 OK 21:51:36.509 [main] DEBUG org.apache.http.headers - << HTTP/1.1 200 OK 21:51:36.511 [main] DEBUG org.apache.http.headers - << Server: CouchDB/0.11.0 (Erlang OTP/R13B) 21:51:36.512 [main] DEBUG org.apache.http.headers - << Date: Sun, 06 Jun 2010 20:51:36 GMT 21:51:36.514 [main] DEBUG org.apache.http.headers - << Content-Type: text/plain;charset=utf-8 21:51:36.516 [main] DEBUG org.apache.http.headers - << Content-Length: 38 21:51:36.517 [main] DEBUG org.apache.http.headers - << Cache-Control: must-revalidate 21:51:36.519 [main] DEBUG o.a.h.i.client.DefaultHttpClient - Connection can be kept alive indefinitely 21:51:36.522 [main] DEBUG org.apache.http.wire - << "{"total_rows":4,"offset":0,"rows":[]}[\n]" 21:51:36.524 [main] DEBUG o.a.h.i.c.SingleClientConnManager - Releasing connection org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@2d3853 21:51:36.526 [main] DEBUG c.j.c.CouchStringResponseHandler - Recieved response:{"total_rows":4,"offset":0,"rows":[]} regards Darran --0016e6541d8820ca83048862dd01--