title: How to retrieve a web page needing authentication in Emacs, can't get url.el to authenticate
body: <p>I'm using the following code:</p>
  
  <pre><code>(defvar xyz-user-name "LOGIN")
  (defvar xyz-password "PASS")
  (defvar site "http://www.site.com/")
  (defvar xyz-block-authorisation nil 
  "Flag whether to block url.el's usual interactive authorisation procedure")
  (defadvice url-http-handle-authentication (around xyz-fix)
  (unless xyz-block-authorisation
    ad-do-it))
  (ad-activate 'url-http-handle-authentication)
  (defun login-show-posts ()
     (interactive)
     (let ((xyz-block-authorisation t)
           (url-request-method "GET")
           (url-request-extra-headers 
                        `(("Authorization" . ,(concat "Basic "
                                  (base64-encode-string
                                   (concat xyz-user-name ":" xyz-password)))))))
       (url-retrieve site 
                     (lambda (status)
                     (switch-to-buffer (current-buffer))))))
  </code></pre>
  
  <p>But I just get the webpage text without authentication, i.e. it didn't authenticate. How can I make it authenticate. I've been busting my brains, reading everything on url-request-extra-headers that I could find, but can't get it done.</p>
  
  <p>Anyone?</p>
  
  <h2>Thanks</h2>
  
  <p>JJ</p>