HTTPPOST        Submit an HTTP/HTTPS POST transaction

Top  Previous  Next

Syntax:

HTTPPOST

[ target resource ] [ input source ] [ output target ]

Arguments:

[ target resource ]

Variable or string defining the target resource name to POST to.


[ input source ]

Variable or string providing HTTP Request body contents.


[ output target ]

Variable or string providing location to store HTTP Response body contents.

Options:

/intype=xx

Input source type: string, file, or prepared.  The default is file.


/outtype=xx

Output source type: string or file.  The default is file.


/contenttype=xx

HTTP Content-Type header, default: "text/plain; charset=utf-8" This option is ignored when /intype=prepared.


/header=xx

add an arbitrary header to the post request ex:

/header='SOAPAction: "urn:cdc:iisb:2011:connectivityTest"'

To specify multiple headers, use this argument multiple times.

 

 

This script command will perform a POST transaction on a HTTP/HTTPS site.  Most common web forms use POST transactions.

 

This is an example of the HTTPPOST command:

 

HTTPPOST "example.php" "infile.txt" "outfile.txt"

 

Consider the following example where your input source is a string rather than a file name:

 

HTTPPOST "example.php" "this is the request body" "outfile.txt" /intype=string

 

Consider the following example where you would like the response body to be stored in a variable rather than a file:

 

HTTPPOST "example.php" "infile.txt" outvar /outtype=string

 

Consider the following example where your request body’s content is iso8859-1 encoded xml:

 

HTTPPOST "/rootdir/example.php" "infile.xml" "outfile.xml" /contenttype="text/xml; charset=iso8859-1"

 

 

You may wish to build your HTTP POST Request programmatically in a script rather than using a static string or text file.  To accomplish this task, build the Request body using the PREPAREPOST and POSTVALUE script commands and then submit it with HTTPPOST using the /intype=prepared option.

 

Wildcard characters are not permitted with the HTTPPOST command.

 

Use the RCVFILE script command to submit web forms that rely on the HTTP GET verb.

 

 

Related command(s): PREPAREPOST, POSTVALUE

See also: HTTP Considerations