[racket] Http post using post-impure-port

From: Daniel Phelps (phelps.da at gmail.com)
Date: Fri Jun 11 15:18:54 EDT 2010

Hi all,
I'm having trouble with post-impure-port from net/url.

I'm trying to post two fields like this:

#lang racket
(require net/url)
(require net/uri-codec)

(define my-url
 (string->url "http://localhost:49986/foo/bar/"))

(post-impure-port my-url #"foo=bar&fiz=fuz")

An http post occurs but the data is nowhere to be found on
the server; the strings foo and fiz are null.  I expect them
to be "bar" and "fuz".

My server-side code works from the browser.

What am I missing?  I apologize if my question is silly.

Daniel


Posted on the users mailing list.