I use url-retrieve-synchronously function.
But I must use proxy to connect to internet.
So I set url-proxy-services correctly and url-retrieve-synchronously
works ok,But I must input username and password.
How can I automatic send username and password?
Thanks.
KL> I use url-retrieve-synchronously function.
KL> But I must use proxy to connect to internet.
KL> So I set url-proxy-services correctly and url-retrieve-synchronously
KL> works ok,But I must input username and password.
KL> How can I automatic send username and password?
Try using auth-sources authentication. From the source commentary:
;; Easy setup:
;; (require 'auth-source)
;; (customize-variable 'auth-sources) ;; optional
;; now, whatever sources you've defined for password have to be available
;; if you want encrypted sources, which is strongly recommended, do
;; (require 'epa-file)
;; (epa-file-mode)
;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important
;; before you put some data in ~/.authinfo.gpg (the default place)
;;; For url-auth authentication (HTTP/HTTPS), you need to use:
;;; machine yourmachine.com:80 port http login testuser password testpass
;;; This will match any realm and authentication method (basic or
;;; digest). If you want finer controls, explore the url-auth source
;;; code and variables.
It's not documented properly yet, but this should get you started.
Basically set up an authinfo file and put the proxy username and
password in it.
Ted