ExecuteHttpMethod

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command executes HTTP method on the specified GSM port. It requires that connection to HTTP server on this GSM port be already established.
HTTP method can be GET, PUT, DELETE or POST. Input file path is used for PUT and POST methods, output file path is used for GET, DELETE and POST methods. If any of required parameter is not needed it can be specified as NULL string (""). Optional HTTP header name and value should be specified always in pair. Up to 12 HTTP headers can be specified. Command waits until data is transferred or general timeout expired.


COMMAND

Command Input arguments Returns
ExecuteHttpMethod Port index, HTTP Method, URL, User Name, Password, File Path, list of pairs HTTP Header Name - HTTP Header Value In the case of error, Error Code

All error messages are available in Data Commands Status Message list


EXAMPLE

~# ExecuteHttpMethod 0 GET www.iqsim.com "pdubois" "iqsim" """/var/test/iqsim.html" "Accept" "text/html" "Transfer-coding" "compress"
OK

~# ExecuteHttpMethod 4 GET www.iqsim.com "" "" "" "/var/test/iqsim.html" "Accept" "text/html" "Transfer-coding" "compress"
AUTHENTICATION FAILED

~# ExecuteHttpMethod 4 GET www.iqsim.com "" "" "" "/var/test/iqsim.html" "Accept"
BAD PARAMETERS

~# ExecuteHttpMethod 0 PUT www.iqsim.com "pdubois" "iqsim" "/var/test/put.htm" "" 60
FILE NOT FOUND

~# ExecuteHttpMethod 0 POST www.iqsim.com "pdubois" "iqsim" "/var/test/put.htm" "/var/test/iqsim.html" "Accept" "text/html" "Transfer-coding" "compress"
OK