diff options
Diffstat (limited to 'stdlib/source/library/lux/world/net/http/route.lux')
-rw-r--r-- | stdlib/source/library/lux/world/net/http/route.lux | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/stdlib/source/library/lux/world/net/http/route.lux b/stdlib/source/library/lux/world/net/http/route.lux index 9da7710ac..e882c126c 100644 --- a/stdlib/source/library/lux/world/net/http/route.lux +++ b/stdlib/source/library/lux/world/net/http/route.lux @@ -1,24 +1,24 @@ (.using - [library - [lux {"-" or} - [control - [monad {"+" do}] - ["[0]" maybe] - [concurrency - ["[0]" async]]] - [data - ["[0]" text] - [number - ["n" nat]]]]] - ["[0]" // {"+" URI Server} - ["[1][0]" status] - ["[1][0]" response]]) + [library + [lux {"-" or} + [control + [monad {"+" do}] + ["[0]" maybe] + [concurrency + ["[0]" async]]] + [data + ["[0]" text] + [number + ["n" nat]]]]] + ["[0]" // {"+" URI Server} + ["[1][0]" status] + ["[1][0]" response]]) (template [<scheme> <name>] [(def: .public (<name> server) (-> Server Server) - (function (_ (^@ request [identification protocol resource message])) - (case (value@ //.#scheme protocol) + (function (_ (^let request [identification protocol resource message])) + (case (the //.#scheme protocol) {<scheme>} (server request) @@ -32,8 +32,8 @@ (template [<method> <name>] [(def: .public (<name> server) (-> Server Server) - (function (_ (^@ request [identification protocol resource message])) - (case (value@ //.#method resource) + (function (_ (^let request [identification protocol resource message])) + (case (the //.#method resource) {<method>} (server request) @@ -54,12 +54,12 @@ (def: .public (uri path server) (-> URI Server Server) (function (_ [identification protocol resource message]) - (if (text.starts_with? path (value@ //.#uri resource)) + (if (text.starts_with? path (the //.#uri resource)) (server [identification protocol - (revised@ //.#uri - (|>> (text.clip_since (text.size path)) maybe.trusted) - resource) + (revised //.#uri + (|>> (text.clip_since (text.size path)) maybe.trusted) + resource) message]) (async.resolved //response.not_found)))) |