[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using the url package results in mailcap issue
From: |
Paulo J. Matos |
Subject: |
Using the url package results in mailcap issue |
Date: |
Tue, 16 Aug 2011 09:32:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
Hi all,
I have the following code in Emacs 23.2.1:
(require 'url)
(require 'url-http)
(require 'cl)
(setq *base-url*
"http://ukbugdb/api.php")
(defun my-switch-to-url-buffer (status)
(switch-to-buffer (current-buffer)))
(defun my-url-http-post (url args)
"Send ARGS to URL as a POST request."
(let ((url-request-method "POST")
(url-request-extra-headers
'(("Content-Type" . "application/x-www-form-urlencoded")))
(url-request-data
(mapconcat (lambda (arg)
(concat (url-hexify-string (car arg))
"="
(url-hexify-string (cdr arg))))
args
"&")))
;; if you want, replace `my-switch-to-url-buffer' with
`my-kill-url-buffer'
(url-retrieve url 'my-switch-to-url-buffer)))
(my-url-http-post "http://ukbugdb/api.php?BugID=B-100000&fn=getbugname_json"
'(("BugID" . "B-100000") ("fn" . "getbugname_json")))
I get the backtrace:
Debugger entered--Lisp error: (error "Autoloading failed to define
function mailcap-parse-mailcaps")
mailcap-parse-mailcaps()
url-do-setup()
url-retrieve-internal("http://ukbugdb/api.php?BugID=B-100000&fn=getbugname_json"
my-switch-to-url-buffer (nil))
url-retrieve("http://ukbugdb/api.php?BugID=B-100000&fn=getbugname_json"
my-switch-to-url-buffer)
(let ((url-request-method "POST") (url-request-extra-headers ...)
(url-request-data ...)) (url-retrieve url (quote my-switch-to-url-buffer)))
my-url-http-post("http://ukbugdb/api.php?BugID=B-100000&fn=getbugname_json"
(("BugID" . "B-100000") ("fn" . "getbugname_json")))
eval((my-url-http-post
"http://ukbugdb/api.php?BugID=B-100000&fn=getbugname_json" (quote (...
...))))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
recursive-edit()
byte-code("\306 @\307=\203!
Any hints on what the mailcap problem is?
Cheers,
--
PMatos
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using the url package results in mailcap issue,
Paulo J. Matos <=