(use rfc.http)
(use rfc.uri)

(define (alist->query alis)
  (string-join
   (map (lambda (p)
	  (format "~A=~A"
		  (uri-encode-string (symbol->string (car p)))
		  (uri-encode-string (cdr p))))
	alis)
   ";"))

(receive (status _ res)
    (http-post "ll.jus.or.jp"
               "/2008/blog/archives/38/trackback"
               (alist->query
                '((title . "LL Golf Hole 9")
                  (blog_name . "LL Golf Hole 9")
                  (url . "http://ja.doukaku.org/207/")
                  (excerpt . "trackback from LL Golf Hole 9 with Scheme."))))
  (when (string=? status "200")
    (print res))
  0)
