• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP MIME POST
7HTTP FORMPOST
8</keywords>
9</info>
10# Server-side
11<reply>
12<data>
13HTTP/1.0 200 OK swsclose
14Date: Tue, 09 Nov 2010 14:49:00 GMT
15Server: test-server/fake
16
17blablabla
18
19</data>
20</reply>
21
22# Client-side
23<client>
24<server>
25http
26</server>
27 <name>
28HTTP custom Content-Type with parameter
29 </name>
30 <command>
31http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -H 'Content-type: multipart/form-data; charset=utf-8' -F name=daniel -F tool=curl
32</command>
33</client>
34
35# Verify data after the test has been "shot"
36<verify>
37<strippart>
38s/^--------------------------[a-z0-9]*/------------------------------/
39s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
40</strippart>
41<protocol>
42POST /we/want/%TESTNUMBER HTTP/1.1
43Host: %HOSTIP:%HTTPPORT
44User-Agent: curl/%VERSION
45Accept: */*
46Content-Length: 242
47Content-Type: multipart/form-data; charset=utf-8; boundary=----------------------------
48
49------------------------------
50Content-Disposition: form-data; name="name"
51
52daniel
53------------------------------
54Content-Disposition: form-data; name="tool"
55
56curl
57--------------------------------
58</protocol>
59</verify>
60</testcase>
61