[plt-scheme] post-pure-port
Hi,
I'm having a problem using post-pure-port.
In the program listed below the bindings args are coming through as
((first-name . Albert;last-name=Einstein;birthday-buttton=...))
to object-test.ss.
Any ideas?
Many thanks!
Cheers,
David
(require (lib "url.ss" "net")
(lib "cgi.ss" "net")
(lib "uri-codec.ss" "net"))
(define the-url (string->url "http://bach/cgi-bin/object-test.ss"))
(define the-args (alist->form-urlencoded (list (cons 'first-name "Albert") (cons 'last-name "Einstein")
(cons 'birthday-buttton "..."))))
(define the-port (post-pure-port
the-url
(string->bytes/utf-8 the-args)
(list "Content-Type: application/x-www-form-urlencoded")))