test386 (1265B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP POST 6 --json 7 </keywords> 8 </info> 9 # 10 # Server-side 11 <reply> 12 <data> 13 HTTP/1.1 200 OK 14 Date: Tue, 09 Nov 2010 14:49:00 GMT 15 Server: test-server/fake 16 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 17 ETag: "21025-dc7-39462498" 18 Accept-Ranges: bytes 19 Content-Length: 6 20 Connection: close 21 Content-Type: text/html 22 Funny-head: yesyes 23 24 -foo- 25 </data> 26 <data2> 27 HTTP/1.1 200 OK 28 Date: Tue, 09 Nov 2010 14:49:00 GMT 29 Server: test-server/fake 30 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 31 ETag: "21025-dc7-39462498" 32 Accept-Ranges: bytes 33 Content-Length: 6 34 Connection: close 35 Content-Type: text/html 36 Funny-head: yesyes 37 38 hello 39 </data2> 40 </reply> 41 42 # 43 # Client-side 44 <client> 45 <server> 46 http 47 </server> 48 <name> 49 HTTP with --json + --next 50 </name> 51 <command> 52 --json '{ "drink": "coffe" }' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 53 </command> 54 </client> 55 56 # 57 # Verify data after the test has been "shot" 58 <verify> 59 <protocol> 60 POST /%TESTNUMBER HTTP/1.1 61 Host: %HOSTIP:%HTTPPORT 62 User-Agent: curl/%VERSION 63 Content-Type: application/json 64 Accept: application/json 65 Content-Length: 20 66 67 { "drink": "coffe" }GET /%TESTNUMBER0002 HTTP/1.1 68 Host: %HOSTIP:%HTTPPORT 69 User-Agent: curl/%VERSION 70 Accept: */* 71 72 </protocol> 73 </verify> 74 </testcase>