emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you do authentication with url.el?


From: Dan LaManna
Subject: Re: How do you do authentication with url.el?
Date: Fri, 13 Nov 2015 09:18:21 -0500

This should work:

(let ((url-request-method "PUT")
      (url-request-extra-headers 
          `(("Authorization" . ,(concat "Basic "
                                        (base64-encode-string
                                         "user:token"))))))
  (url-retrieve-synchronously
"https://api.github.com/user/starred/Malabarba/EndlessParentheses";))

Left you a star ;)

On Fri, 13 Nov 2015 13:16:14 +0000
Artur Malabarba <address@hidden> wrote:

> > url-retrieve-synchronously still asks me for a user/password
> > combination even if I write it like that.
> 
> Just to clarify what's happening. Running this command succeeds
> immediately: curl -X PUT
> https://USER:address@hidden/user/starred/Malabarba/EndlessParentheses
> 
> But evaluating this asks me for a user/password combination:
>     (let ((url-request-method "PUT"))
>       (url-retrieve-synchronously
> "https://USER:address@hidden/user/starred/Malabarba/EndlessParentheses";))
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]