reading data from socket after a PUT or POST?

jbv jbv.silences at Club-Internet.fr
Thu Apr 7 15:57:59 EDT 2005



Frank ,

> Does anyone know how to read data on a socket after using libUrl to do
> a PUT or POST?
>
> I'm uploading an image to a web server (successfully!), and the web
> server sends a response back after the PUT or POST completes...but I
> can't figure out how to either 1) get libUrl to read the response and
> return the data,

it's quite simple : the response from the server is in the "it" variable
after the POST; for example :

  get ""
  post "myValue" to URL "http://www.myDomain.com/cgi-bin/myScript.cgi"
  wait until it is not ""
   if it contains "OK" then
        do something else
   end if

There are probably more elegant ways to code it, but it works.
And you get the idea.

Hth,
JB



More information about the use-livecode mailing list