From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Edward O'Connor" Newsgroups: gmane.emacs.devel Subject: How to non-interactively provide auth info to URL, and how to force URL to use HTTP AUTH Date: Tue, 15 Dec 2009 12:02:08 -0800 Message-ID: <3b31caf90912151202j7dc91abat65e21a11aa636ef0@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1260907369 13399 80.91.229.12 (15 Dec 2009 20:02:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2009 20:02:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 15 21:02:41 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NKdbT-0004fu-Az for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2009 21:02:39 +0100 Original-Received: from localhost ([127.0.0.1]:56380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKdbT-0002N9-AR for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2009 15:02:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKdbO-0002Lk-9S for emacs-devel@gnu.org; Tue, 15 Dec 2009 15:02:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKdbJ-0002C9-Lc for emacs-devel@gnu.org; Tue, 15 Dec 2009 15:02:33 -0500 Original-Received: from [199.232.76.173] (port=33335 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKdbJ-0002Bk-BM for emacs-devel@gnu.org; Tue, 15 Dec 2009 15:02:29 -0500 Original-Received: from mail-vw0-f176.google.com ([209.85.212.176]:43304) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKdbJ-0003D3-01 for emacs-devel@gnu.org; Tue, 15 Dec 2009 15:02:29 -0500 Original-Received: by vws6 with SMTP id 6so78187vws.14 for ; Tue, 15 Dec 2009 12:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=RFM3KjQFSjQEJswta2elEaf4MgP20MKyD/f2Um/Ax8E=; b=mmzOICnHkbrrc6J8s+LT69ZI/9gNaUPiyo0LeAP6q2hTxdkPR5tzh9k780F0miL7mI f7jgpkz+l2s2R62jJqgLCzaJsKvhGcwjaA86ejb7SHCgw0JrDYlBwIXSMdk9b64aIqYj OcEpXPsQG1hgMccwzFPBxwk37MhOqA9bsv4t0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=wsDP7lcqwYB3VThbOplBgWiABjjny0LxixOgdeAAGwq91yXdHQ+sPbqK9igvaf8m2+ VYrw2TR+kObf/933XnCOf7Hfg5eP2hk7ISHM279ozw6IOme7C8v59KL06ll3qrY9auFl +q7/eCreAp38bvhfjy/7qfPr++hGYX7b1ZLLw= Original-Received: by 10.220.127.74 with SMTP id f10mr1258134vcs.83.1260907348081; Tue, 15 Dec 2009 12:02:28 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118637 Archived-At: Hi, I've made a lot of use out of url.el over the years, and it's for the most part been a nice experience. But I haven't been able to wrap my brain around how to use HTTP AUTH in a nice-to-the-user way. Here's the scenario: I work on several elisp clients for various APIs which are exposed via HTTP and make use of HTTP AUTH. When a developer uses my library, they supply the relevant auth info to my library explicitly. I would then like to invoke url-retreive and have the resulting request use basic (or digest) auth with the auth info I already have, *without prompting the user* for a username or password. I keep failing to figure out how to do this. I'd really rather not resort to shelling out to curl, but this is *very easy* to do with curl (a simple "curl -u user:pass url-to-api-call" will do), and it's not at all clear how to do it with url.el. Any suggestions on how to proceed would be most welcome! Thanks, Ted