test669 1.2 KB

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