This is the simple-routes Reference Manual, version 0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:42:38 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
simple-routes
Facility for straightforward http routing on top of Hunchentoot.
Currell Berry
2 clause BSD
0.3
hunchentoot
(system).
cl-ppcre
(system).
simple-routes.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
simple-routes/simple-routes.asd
simple-routes
(system).
simple-routes/simple-routes.lisp
simple-routes
(system).
*routeslist*
(special variable).
acceptor-dispatch-request
(method).
bind-alist-values
(macro).
compile-routes
(macro).
define-simple-handler
(macro).
simpleroutes-acceptor
(class).
simpleroutes-ssl-acceptor
(class).
issymbolstring
(function).
lastitem
(function).
removelast
(function).
routespec-compile
(function).
simple-router
(function).
Packages are listed by definition order.
simple-routes
cl-ppcre
.
common-lisp
.
hunchentoot
.
*routeslist*
(special variable).
bind-alist-values
(macro).
compile-routes
(macro).
define-simple-handler
(macro).
simpleroutes-acceptor
(class).
simpleroutes-ssl-acceptor
(class).
issymbolstring
(function).
lastitem
(function).
removelast
(function).
routespec-compile
(function).
simple-router
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
should contain routes compiled with routespec-compile or manually entered in compiled form incoming requests are matched up against each item in *routeslist* successively, until (and if) a matching routespec is found.
this is intended to be used to access get and post parameters. example usage
(bind-alist-values (first second) (hunchentoot:get-parameters*)
(list first second))
simpleroutes-acceptor
) request) ¶The simple request dispatcher which tries to complete the request using simple,
but otherwise falls back to the hunchentoot defaults *dispatch-table* and easy-acceptor
hunchentoot
.
This first tries to route requests using simple-router, then falls back to hunchentoot’s default easy-acceptor.
easy-acceptor
.
This is an acceptor that mixes the simpleroutes acceptor with SSL connections.
simpleroutes-acceptor
.
ssl-acceptor
.
removes the last item in sequence IF THE SEQUENCE HAS A LAST ITEM
httpmethod can be one of :GET :HEAD :POST :PUT :DELETE or :ALL
urldef is a url definition string sharing *basic* syntax with Ruby on Rails
fntocall is the function to call in case the this is found to be a match for the request
this macro returns a list which is meant to be processed by cl-simple routehandler
example call:
=>(rtreg :GET “/home/next/:number” #’nxthandler) returns
(:GET "^/home/next/([^/]*)$" (NUMBER)
#<CLOSURE (LAMBDA # :IN MACRO-FUNCTION) {1000F213DB}>)
the output of this macro can in turn be processed by simple-processor
takes in a request uri and type (:GET, :POST, etc...) and loops through all
compiled routes in *routeslist*. If it finds a route that matches
,it returns the associated handler and returns true. otherwise returns false
Jump to: | A B C D F I L M R S |
---|
Jump to: | A B C D F I L M R S |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*routeslist* : | Public special variables | ||
| |||
S | |||
Special Variable, *routeslist* : | Public special variables | ||
|
Jump to: | *
S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|