Question
Gagan Kaushik · May 2, 2021

difference between OnPreHTTPafter and OnPreHTTP

in CSP what is the difference between OnPreHTTPafter and OnPreHTTP.

And how code execution is different if written in above mentioned TAGS and  <script language="cache" runat="server"></script>

Product version: Caché 2018.1
00
1 0 3 54
Log in or sign up to continue

Replies

Where did you find OnPreHTTPafter? There is only OnPreHTTP method, probably it's a custom method in your application.

<script language=objectscript method=OnPreHTTP arguments="" returntype=%Boolean>
 Quit 1 
</script>

its written in our csp(s)

<script arguments="" language="cache" method="OnPreHTTP" returntype="%Library.Boolean">
    do some work
</script>

<script language="cache" method="OnPreHTTPafter" arguments="" returntype="%Library.Boolean">

  do some work
</script>

I know both get called when page gets load/submitted. I need to know the difference between both

So, you may have something like this in your CSP file

<csp:class super="%CSP.Page,App.Utils">

By default, it has only %CSP.Page class, but you may have some other class, where you may the logic with method OnPreHTTPafter