Annotation of parser3/tests/346-curl.html, revision 1.3
1.3 ! moko 1: @main[]
! 2:
1.2 moko 3: ^try-catch{ ^curl:info[] }
4: ^try-catch{ ^curl:options[ $.charset[UTF-8] ] }
5: ^try-catch{ ^curl:options[ $.url[http://parser.ru/] ] }
6:
7: ^curl:session{ $s[^curl:version[]] }
8:
9: ^try-catch{ ^curl:options[ $.library[no-such-library.so] ] }
10:
1.1 moko 11: ^curl:session{
1.3 ! moko 12: ^try-catch{ ^curl:options[ $.url[ftp://parser.ru/] ] }
! 13: ^try-catch{ ^curl:options[ $.httppost[ $.name[ $.hash[] ]] ] }
! 14: ^try-catch{ ^curl:options[ $.no-such-option[] ] }
! 15: ^try-catch{ ^curl:info[no-such-info] }
! 16: ^json:string[^curl:info[]]
! 17:
! 18: ^curl:options[
! 19: $.url[http://www.parser.ru/_/tests/readme]
! 20: $.timeout(5)
! 21: ]
! 22:
! 23: $f[^curl:load[
! 24: $.range[4-]
! 25: ]]
! 26:
! 27: $f.text $f.CONTENT-RANGE
! 28:
! 29: $f[^curl:load[
! 30: $.range[33-]
! 31: ]]
! 32:
! 33: $f.text $f.CONTENT-RANGE
! 34: }
! 35:
! 36: ^show[text;^curl:load[
! 37: $.url[http://www.parser.ru/_/tests/223.pl]
! 38: $.timeout(5)
! 39: $.postfields[test]
! 40: $.useragent[^taint[parser 3]]
! 41:
! 42: $.name[test.txt]
! 43: $.mode[binary]
! 44: $.content-type[something/text]
! 45: ]]
! 46:
! 47: ^show[binary;^curl:load[
! 48: $.url[http://www.parser.ru/_/tests/223.pl]
! 49: $.timeout(5)
! 50: $.postfields[^file::load[binary;155.cfg]]
! 51: ]]
! 52:
! 53: ^try-catch{ ^curl:load[ $.url[http://no-such-domain.parser.ru/] ] }
! 54:
! 55: @show[title;f]
! 56: $title : {
! 57: "name":"$f.name",
! 58: "size":$f.size,
! 59: "mode":"$f.mode",
! 60: "content-type":"^taint[json;$f.content-type]",
1.1 moko 61: }
1.3 ! moko 62:
! 63: $text[^taint[as-is][$f.text]]
! 64: # cut off the post's body is any
! 65: $text[^text.match[POST:(.*)<EOF>][]{$post[$match.1]}]
! 66:
! 67: # create table with http headers
! 68: $t[^table::create[nameless]{^taint[as-is][^text.replace[^table::create{a b
! 69: = ^taint[^#09]
! 70: ^taint[^#0A] ^taint[^#0A]}]]}]
! 71: ^t.sort{$t.0}
! 72:
! 73: # print all
! 74: <h3>Headers</h3>
! 75: <pre>^t.menu{$t.0 : $t.1}[^#0A]</pre>
! 76:
! 77: <h3>Body</h3>
! 78: <pre>^taint[as-is][$post]</pre>
! 79: <hr />
E-mail: