[racket] Http post using post-impure-port

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Jun 11 15:36:36 EDT 2010

I did a quick check of the source code and post-impure-port definitely
does send the post data -- at least functions to do so appear in the
code. Have you tried a packet sniffer like Wireshark? That will tell
exactly was is being sent over the wire.

HTH,
N.

On Fri, Jun 11, 2010 at 8:18 PM, Daniel Phelps <phelps.da at gmail.com> wrote:
> 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.