ns_register_proc
Overview
Register a procedure for a URL
Syntax
ns_register_proc ?-noinherit? method URL procname ?args?
Description
ns_register_proc registers the procname to handle this method/URL combination. When the server gets a matching request, it calls procname with the connection id and any args specified here.
Normally, the AOLserver calls procname for any URL below URL. For instance, /foo/bar/hmm matches /foo/bar if there is no /foo/bar/hmm. The -noinherit flag forces the match to be exact.
Example
ns_register_proc GET /hello hello
proc hello {conn context} {
ns_return $conn 200 text/plain "Hello World"
}
See Also
Ns_RegisterRequest (C API), Ns_UnRegisterRequest (C API)