that works, you saved my day...
Thank you very much...
I am not sure if I quite following you...I added the line that you suggested but I still got the login prompt when the session is expired.
{ Parameter UseSession As Integer = 1; Parameter HandleCorsRequest = 1; XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/Record/:schema/:table/:id" Method="GET" Call="Record" />
</Routes>
}
{
#dim eException As %Exception.AbstractException
#dim tSC As %Status = $$$OK
Try
{
Set %response.ContentType="application/json"
do %response.SetHeader("WWW-Authenticate","Basic")
set className = "ABC.KAT.Data."_schema_"."_table
set tRS = $CLASSMETHOD(className, "%OpenId", id)
set jsonstring =""
$$$THROWONERROR(tSC,tRS.%JSONExportToString(.jsonstring))
set tResult = ##class(%DynamicObject).%FromJSON(jsonstring)
write tResult.%ToJSON()
}
Catch eException
{
Set tSC = eException.AsStatus()
}
Quit tSC
} }
@Robert Cemper @Erik Hemdal
Thank you for replied to my question and that is what I was expected, just want to make sure if that is something that I am not aware of...
I marked both your replies as an answer....
Thanks,
Hoi