simplePostToHost {httpRequest}R Documentation

Sends Simple Post Request to HTTP Server (host)

Description

Sends Post Request to HTTP Server

Usage

        simplePostToHost(host, path, referer, datatosend, port=80)

Arguments

host The host to which to send the Request eg.: www.spiegel.de, localhost
path The path to the file eg. /cgi-bin/paramlist.cgi or /index.html
referer something like www.myhome.org
datatosend key value pairs pairs separated by & "pid=14\&pollvotenumber=2\n4"
port its 80 or 8080 most frequently

Details

It is a simple http client. So it does not take care of special chars e.g. whitspaces. For details see e.g. perl HTTP::Request::Common documentation. and http://www.w3.org/Protocols/rfc1341/0_TableOfContents.html

Value

The document which the server returns as a string.

Author(s)

E.W.Wolski wolski@molgen.mpg.de

See Also

getToHost, postToHost

Examples

#before you use the example check that the server www.molgen.mpg.de is running.
#port <- 80
#data = "pid=14&poll_vote_number=2";
#simplePostToHost("www.molgen.mpg.de","/~wolski/test.php4","",data,port=port)

[Package httpRequest version 0.0.6 Index]