User bio
404 bio not found
Member since Feb 4, 2016
Replies:

for the example you provided given that the methods invoked by the <routes> are classmethod I commonly do something along the lines of 

    <Route Url="/error/list" Method="GET" Call="GetErrors" />

ClassMethod GetErrors(pStartTime As %UTC = "", pEndTime As %UTC = "") As %Status

{

    #DIM tSC                    As %Status = $$$OK

    #DIM eException             As %Exception.AbstractException

    #DIM %request               As %CSP.Request

   

    Try {

            Set:$Get(%response)'="" %response.ContentType="application/json"

            If $Get(%request) {

                Set tStartDate = $Get(%request.Data("StartTime",1))

                Set tStopDate = $Get(%request.Data("EndTime",1))

            }

            Else {

                #;If they are defined in the parameter list

                If pStartTime'="" Set tStartDate=pStartTime

                If pEndTime'="" Set tStopDate=pEndTime

            }

Certifications & Credly badges:
Global Masters badges:
Followers:
Following:
Stephen has not followed anybody yet.