Archive of UserLand's first discussion group, started October 5, 1998.

Doing a HTTP-POST from Frontier

Author:Dave Winer
Posted:7/26/1999; 8:02:58 AM
Topic:Doing a HTTP-POST from Frontier
Msg #:8740
Prev/Next:8739 / 8741

I was looking around for sample code that does an HTTP POST, but found nothing, so here's a bit of code that sends a request to the What's Related page, and displays the resulting HTML in a wptext window.

local (s = tcp.httpClient ("POST", "nirvana.userland.com", 80, "/whatsrelated/default", datatype:"application/x-www-form-urlencoded", data:"url=http%3A%2F%2Fwww.netscape.com%2F"));
wp.newtextobject (s, @scratchpad.s); edit (@scratchpad.s)

Preserved for posterity.





This page was archived on 6/13/2001; 4:51:32 PM.

© Copyright 1998-2001 UserLand Software, Inc.