1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
.TH GOLF 2gg $VERSION $DATE Development Tools
.SH NAME
after-handler \- (service-processing)
.SH PURPOSE
Execute your code after a request is handled.
.SH SYNTAX
.RS 4
.EX
after-handler
\[char46]..
end-after-handler
.EE
.RE
.SH DESCRIPTION
Every Golf request goes through a request dispatcher (see \fBrequest\fP()). In order to specify your code to execute after a request is handled, create source file "after-handler.golf" and implement a handler that starts with "after-handler" and ends with "end-after-handler", which will be automatically picked up and compiled with your application.
If no request executes (for example if your application does not handle a given \fBrequest\fP), after-handler handler does not execute either. If you use \fBexit-handler\fP to exit current request handling, after-handler handler still executes.
.SH EXAMPLES
Here is a simple implementation of after-handler handler that just outputs "Hi there!!":
.RS 4
.EX
after-handler
@Hi there!!
end-after-handler
.EE
.RE
.SH SEE ALSO
Service processing
\fBafter-handler\fP
\fBbefore-handler\fP
\fBbegin-handler\fP
\fBcall-handler\fP
See all
\fBdocumentation\fP
|