Means to input to a POST using libwww
Linda Nettleton A211 (nettleto@fsl.noaa.gov)
Sat, 24 Feb 1996 11:12:57 -0700 (MST)
Hello,
When I was using the perl 4 libwww routines, I devised
a script which took an input file and used it as direct input
to a POST command. Here follows an example script:
POST -c application/x-www-form-urlencoded http://mss.fsl.noaa.gov:8888/cgi-bin/
dsrsReqstParms.cgi < dsrs.in
dsrs.in was a TEXT file containing:
ErrorNotice=nettleto@fsl.noaa.gov&
MessageAddress=nettleto@fsl.noaa.gov&
InterfaceFlag=CLI&
TheRequest=DSRSstore&
SourcePath=/public/sao/mssform/9430112000100o+
/public/1994_10/sao/mssform/9430113000100o+
/public/1994_10/sao/mssform/9430114000100o&
DestinationPath=/FRD/sao/mssform&
TheUser=nettleto&
TheHost=opus.fsl.noaa.gov&
If I didn't want to have the response from the WEB server, I simply
directed the output to > /dev/null.
With the new libwww for perl 5, I am no longer able to use
the < sign to direct input to the routine. I was able to get
the results I desired by using the command line approach. Here
follows the transcript of that process:
mortimer:/home/mortimer/nettleto/perl> POST -c application/x-www-form-urlencoded http://mss.fsl.noaa.gov:8888/cgi-bin/dsrsReqstParms.cgi
Please enter content (application/x-www-form-urlencoded) to be POSTed:
ErrorNotice=nettleto@fsl.noaa.gov&
MessageAddress=nettleto@fsl.noaa.gov&
InterfaceFlag=CLI&
TheRequest=DSRSstore&
SourcePath=/public/sao/mssform/9430112000100o+
/public/1994_10/sao/mssform/9430113000100o+
/public/1994_10/sao/mssform/9430114000100o&
DestinationPath=/FRD/sao/mssform&
TheUser=nettleto&
TheHost=opus.fsl.noaa.gov&
^d
This is of no use to me since I need to be able to run this in batch.
How does one accomplish that with the new libraries?
Linda Nettleton
------------------------------------------------------------------
Linda Nettleton E-mail: nettleto@fsl.noaa.gov
Forecast Systems Laboratory Fax: 303-497-7259
U.S. Department of Commerce Phone: 303-497-7242
325 Broadway Mail Code: R/E/FS2
Boulder, CO 80303-3328
------------------------------------------------------------------