Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3862DFFB2 for ; Tue, 19 Mar 2013 19:57:43 +0000 (UTC) Received: (qmail 73946 invoked by uid 500); 19 Mar 2013 19:57:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73909 invoked by uid 500); 19 Mar 2013 19:57:41 -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 73901 invoked by uid 99); 19 Mar 2013 19:57:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Mar 2013 19:57:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pulkitsinghal@gmail.com designates 209.85.215.46 as permitted sender) Received: from [209.85.215.46] (HELO mail-la0-f46.google.com) (209.85.215.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Mar 2013 19:57:34 +0000 Received: by mail-la0-f46.google.com with SMTP id fq12so1725679lab.33 for ; Tue, 19 Mar 2013 12:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=3HXr11apnvWioqASKyFFh6trGIraj1/aTFzoROf/IYk=; b=AvHRtA/k7Niop/7iHcfqYVqv8a/oAk/zNysC8uUidI6u8TZfMYpc5aacogxuhMCwdP mXsq/h61gQSDOqUxJmgaiWtC0RPlVs3farJJAwh6TEGHTwbhXjGV5frDI/e8g8PaL+GK QyE3xryR3SFgBq1zctsO1w4SEMEhQVjq3CojCaEUlTHpriSHTNyVaylNMpfhij4CDmaO W6ZwC2VnALZ8S4WkweCJ4NZAh/knpF65GDpHGLQzDEddqE50X40esOOXg8JgHwDeZvNs KbYDcfFH3nchXHWL8UmcWTmjmyE8+MvcMzCYJh6oAJC6mNG6V4yFWbR8SP4Chw11UGFe U++A== MIME-Version: 1.0 X-Received: by 10.152.136.20 with SMTP id pw20mr3132771lab.16.1363723034411; Tue, 19 Mar 2013 12:57:14 -0700 (PDT) Received: by 10.114.161.108 with HTTP; Tue, 19 Mar 2013 12:57:13 -0700 (PDT) Date: Tue, 19 Mar 2013 14:57:13 -0500 Message-ID: Subject: How to workaround missing id in a request to Update Handler From: Pulkit Singhal To: couchdb-user@apache.org Content-Type: multipart/alternative; boundary=f46d042f921009cba204d84c833b X-Virus-Checked: Checked by ClamAV on apache.org --f46d042f921009cba204d84c833b Content-Type: text/plain; charset=UTF-8 1) I have a 3rd-party-webhook API calling into my update handler and there's nothing I can do to make it pass the document ID in the URL. 2) That means the CouchDB server cannot provide the update function with the most recent version of that document. 3) But the request does provide a payload from which I can pull out the document ID ... but by this time I'm inside the update handler function. 4) So my question is: If CouchDB did not provide a doc, is there still a way for me to: a) either, fetch the latest version of the doc myself? b) or, override the existing document with another document formed with my request payload ... without running into a revision conflict? I know that I can probably route the request through a proxy that parses the payload, sets the document ID onto the request URL and sends it own its way ... but I'd rather leave that as a last resort. Thoughts? --f46d042f921009cba204d84c833b--