quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test1221 (1080B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP POST
      6 --data-urlencode
      7 --url-query
      8 </keywords>
      9 </info>
     10 
     11 #
     12 # Server-side
     13 <reply>
     14 <data>
     15 HTTP/1.1 200 I am cool swsclose
     16 Server: Cool server/10.0
     17 Content-Length: 0
     18 
     19 </data>
     20 </reply>
     21 
     22 #
     23 # Client-side
     24 <client>
     25 <server>
     26 http
     27 </server>
     28 <name>
     29 --url-query with --data-urlencode
     30 </name>
     31 <command>
     32 http://%HOSTIP:%HTTPPORT/%TESTNUMBER --url-query "my name is moo[]" --url-query "yes=s i r" --url-query "v_alue@%LOGDIR/%TESTNUMBER.txt" --url-query @%LOGDIR/%TESTNUMBER.txt --url-query "+%3d%3d" --data-urlencode "start=once upon the time"
     33 </command>
     34 <file name="%LOGDIR/%TESTNUMBER.txt">
     35 content to _?!#$'|<>
     36 </file>
     37 </client>
     38 
     39 #
     40 # Verify data after the test has been "shot"
     41 <verify>
     42 <protocol nonewline="yes">
     43 POST /%TESTNUMBER?my+name+is+moo%5b%5d&yes=s+i+r&v_alue=content+to+_%3f%21%23%24%27%7c%3c%3e%0a&content+to+_%3f%21%23%24%27%7c%3c%3e%0a&%3d%3d HTTP/1.1
     44 Host: %HOSTIP:%HTTPPORT
     45 User-Agent: curl/%VERSION
     46 Accept: */*
     47 Content-Length: 24
     48 Content-Type: application/x-www-form-urlencoded
     49 
     50 start=once+upon+the+time
     51 </protocol>
     52 </verify>
     53 </testcase>