2008-03-15 07:22:47 -04:00
|
|
|
USING: http.server.actions http.server.validators
|
|
|
|
|
tools.test math math.parser multiline namespaces http
|
2008-04-23 01:53:42 -04:00
|
|
|
io.streams.string http.server sequences splitting accessors ;
|
2008-04-25 04:23:47 -04:00
|
|
|
IN: http.server.actions.tests
|
2008-03-15 07:22:47 -04:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"a" [ v-number ] { { "a" "123" } } validate-param
|
|
|
|
|
[ 123 ] [ "a" get ] unit-test
|
|
|
|
|
] with-scope
|
2008-03-03 05:40:29 -05:00
|
|
|
|
2008-03-05 22:38:15 -05:00
|
|
|
<action>
|
2008-03-11 04:39:09 -04:00
|
|
|
[ "a" get "b" get + ] >>display
|
2008-03-15 07:22:47 -04:00
|
|
|
{ { "a" [ v-number ] } { "b" [ v-number ] } } >>get-params
|
2008-03-05 22:38:15 -05:00
|
|
|
"action-1" set
|
2008-03-03 05:40:29 -05:00
|
|
|
|
2008-04-23 01:53:42 -04:00
|
|
|
: lf>crlf "\n" split "\r\n" join ;
|
|
|
|
|
|
2008-03-03 05:40:29 -05:00
|
|
|
STRING: action-request-test-1
|
|
|
|
|
GET http://foo/bar?a=12&b=13 HTTP/1.1
|
|
|
|
|
|
|
|
|
|
blah
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
[ 25 ] [
|
2008-04-23 01:53:42 -04:00
|
|
|
action-request-test-1 lf>crlf
|
|
|
|
|
[ read-request ] with-string-reader
|
2008-03-11 04:39:09 -04:00
|
|
|
request set
|
2008-04-25 04:23:47 -04:00
|
|
|
{ } "action-1" get call-responder
|
2008-03-03 05:40:29 -05:00
|
|
|
] unit-test
|