2007-01-22 21:25:56 -05:00
|
|
|
<testcase>
|
2014-04-03 05:06:24 -04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
POST
|
|
|
|
POST callback
|
|
|
|
</keywords>
|
|
|
|
</info>
|
2003-10-07 10:43:48 -04:00
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
2014-01-31 18:58:58 -05:00
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2014-01-31 18:58:58 -05:00
|
|
|
Server: test-server/fake swsclose
|
|
|
|
Connection: close
|
|
|
|
Content-Type: text/html
|
|
|
|
|
2003-10-07 10:43:48 -04:00
|
|
|
hello
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
# tool is what to use instead of 'curl'
|
|
|
|
<tool>
|
2021-03-12 11:38:26 -05:00
|
|
|
lib%TESTNUMBER
|
2003-10-07 10:43:48 -04:00
|
|
|
</tool>
|
|
|
|
|
|
|
|
<name>
|
|
|
|
send HTTP POST using read callback
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-12 11:38:26 -05:00
|
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
2003-10-07 10:43:48 -04:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
2009-05-11 13:21:26 -04:00
|
|
|
<strippart>
|
|
|
|
# remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
|
|
|
|
s/^(this is what we post to the silly web server)\r\n/$1\n/ if($has_charconv)
|
|
|
|
</strippart>
|
2003-10-07 10:43:48 -04:00
|
|
|
<protocol>
|
2021-03-12 11:38:26 -05:00
|
|
|
POST /%TESTNUMBER HTTP/1.1
|
2007-09-14 15:32:31 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-02-09 07:46:41 -05:00
|
|
|
Accept: */*
|
2003-10-07 10:43:48 -04:00
|
|
|
Content-Length: 45
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
|
|
|
this is what we post to the silly web server
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
2007-01-22 21:25:56 -05:00
|
|
|
</testcase>
|