Written by

Sr. Software Engineer at HST Pathways
Question Michael Davidovich · Aug 11, 2023

OnPre/Before/After Method in %CSP.REST for Common Code?

I have tried many methods from super classes of %CSP.REST but I can't find a method I can override that will run after the %response object is created so I can set a header that is common to each implementation method.  It's one line of code in each method to set the header but it would like to make it super easy, simple and just have a method that runs on, before, after the implementation method to set this common header (we want to return the API version in each responses HTTP headers.

Any ideas?  I know I tried OnPreHTTP, OnPage and a few others, but those all seem to be related to the %request; I need to catch a method to handle the %response.

Comments

Michael Davidovich  Aug 11, 2023 to Lorenzo Scalese

I thought I tried that but evidently I didn't.  Worked just right thanks!

0