I see in the server guide and in most server examples that
comes with this "ignore" comment.
What does ignore mean here?
The Handle Sub typically contains the following:
Is there any difference in referring to mreq vs. req or mresp vs. resp?
If I need to call a Sub within the same Handler class, which needs to work on the response, is it ok to use the mresp global within the Sub, or instead should I ignore mresp and pass resp as a parameter of the Sub?
Which one is correct: Option 1 or 2?
And if Option 1 is fine, why ignore it?
Handler class:
Private mreq As ServletRequest 'ignore
What does ignore mean here?
The Handle Sub typically contains the following:
Sub Handle:
Sub Handle(req As ServletRequest, resp As ServletResponse)
mreq = req
mresp = resp
If I need to call a Sub within the same Handler class, which needs to work on the response, is it ok to use the mresp global within the Sub, or instead should I ignore mresp and pass resp as a parameter of the Sub?
Option 1:
Sub Handle(req As ServletRequest, resp As ServletResponse)
mreq = req
mresp = resp
MyPrivateSub
End Sub
Sub MyPrivateSub ()
mresp.write("Hello!")
End Sub
Option 2:
Sub Handle(req As ServletRequest, resp As ServletResponse)
mreq = req
mresp = resp
MyPrivateSub(resp)
End Sub
Sub MyPrivateSub (response As ServletResponse)
response.write("Hello!")
End Sub
Which one is correct: Option 1 or 2?
And if Option 1 is fine, why ignore it?