| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | <testcase> | 
|  | 2 | <info> | 
|  | 3 | <keywords> | 
|  | 4 | HTTP | 
|  | 5 | HTTP POST | 
|  | 6 | </keywords> | 
|  | 7 | </info> | 
|  | 8 |  | 
|  | 9 | # | 
|  | 10 | # Server-side | 
|  | 11 | <reply> | 
|  | 12 | <data> | 
|  | 13 | HTTP/1.1 200 OK swsclose | 
|  | 14 | Date: Tue, 09 Nov 2010 14:49:00 GMT | 
|  | 15 | Server: test-server/fake | 
|  | 16 | Content-Length: 3 | 
|  | 17 |  | 
|  | 18 | OK | 
|  | 19 | </data> | 
|  | 20 | </reply> | 
|  | 21 |  | 
|  | 22 | # Client-side | 
|  | 23 | <client> | 
|  | 24 | <server> | 
|  | 25 | http | 
|  | 26 | </server> | 
|  | 27 | # tool is what to use instead of 'curl' | 
|  | 28 | <tool> | 
|  | 29 | lib%TESTNUMBER | 
|  | 30 | </tool> | 
|  | 31 |  | 
|  | 32 | <name> | 
|  | 33 | HTTP POST text data using CURLOPT_COPYPOSTFIELDS | 
|  | 34 | </name> | 
|  | 35 | <command> | 
|  | 36 | http://%HOSTIP:%HTTPPORT/%TESTNUMBER | 
|  | 37 | </command> | 
|  | 38 | </client> | 
|  | 39 |  | 
|  | 40 | # | 
|  | 41 | # Verify data after the test has been "shot" | 
|  | 42 | <verify> | 
|  | 43 | <protocol nonewline="yes"> | 
|  | 44 | POST /%TESTNUMBER HTTP/1.1 | 
|  | 45 | Host: %HOSTIP:%HTTPPORT | 
|  | 46 | Accept: */* | 
|  | 47 | Content-Length: 4 | 
|  | 48 | Content-Type: application/x-www-form-urlencoded | 
|  | 49 |  | 
|  | 50 | This | 
|  | 51 | </protocol> | 
|  | 52 | </verify> | 
|  | 53 | </testcase> |