Http_post
The http_post tag is used to generate HTTP POST requests and
can test webservices quite well. At the moment you can't handle
cookies, but you do have the ability to add Headers to the
request as well as entities (data that can be added to your
post request to push a file or another piece of data with the
http request).
There are varous attributes to control if we use keepalives and
also to control redirects in http. One important attribute is
the perfrun attribute which when set to false will only log
the necessary information to calculate performance statistics
for this run but wont' log the data that was sent or recevied
by the request. So for those cases in which you you want to
measure the performance you should set that value to true so
that you can get more precise performance numbers.
Children Tags
Events
http.post Event
body
the HTTP post data that was received along with the
HTTP response.
headerout
each of the output headers received from the HTTP request
response will generate an event with this attribute name
as the prefix to the header attribute name. So if you
had a header with the name X then your resulting event
would be named event.headerout.x
bodysize
the size in bytes of the data that was received in the
HTTP response.
status
the status code for the HTTP request.
data
the HTTP post data that was sent along with this
specific request.
bodyhash
the hash of the HTTP post data that was received along
with the HTTP response.
headerin
each of the input headers for the HTTP request will have
an event with this attribute name as the prefix to the
header attribute name. So if you had a header with the
name X then your resulting event would be named
event.headerin.x
datahash
the hash of the HTTP post data that was sent along with
this specific request.
statusmsg
the status code for the HTTP request.
uri
the exact uri passed to the http request.
Required Attributes
uri
the uri is the exact hostname, port and path to where the
following http request should be sent. The format looks
like so: http://server:port/path
Usage Examples
Example #1
<http_post onFailure="fail" perfrun="true" uri="${dtf.http.uri}">
<header name="header1" value="XXXXX" />
<header name="header2" value="YYYY" />
<entity value="${dtf.post.data}" />
</http_post>
Example #2
<http_post uri="${dtf.http.uri}" />