May 2017
Beginner
552 pages
28h 47m
English
Download the tclhttpd package and cd to the bin folder. Start the tclhttpd daemon with this command:
tclsh httpd.tcl
The format to POST and read the HTML response from the generic website resembles this:
$ curl URL -d "postvar=postdata2&postvar2=postdata2"
Consider the following example:
$ curl http://127.0.0.1:8015/guestbook/newguest.html \
-d "name=Clif&url=www.noucorp.com&http=www.noucorp.com"
The curl command prints a response page like this:
<HTML> <Head> <title>Guestbook Registration Confirmed</title> </Head> <Body BGCOLOR=white TEXT=black> <a href="www.noucorp.com">www.noucorp.com</a> <DL> <DT>Name <DD>Clif <DT>URL <DD> </DL> www.noucorp.com </Body>
-d is the argument used for posting. The string argument for ...