This is my REST Class
Class GSK.Rest1 Extends %CSP.REST
{
Parameter HandleCorsRequest = 1;
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
}
ClassMethod Test(name as %String) As %Status
{
w "Hello World "_name
Quit $$$OK
}
}
}
I am expecting result like " Hello World Gunwant" from browser ( localhost:57772/widgetsdirect/rest/Gunwant)
From Postman I am getting same result. But from browser service unavailable error I am getting.
Thanks,
Gunwant
Sure Danny, I will do that.
This is my REST Class
Class GSK.Rest1 Extends %CSP.REST
{
Parameter HandleCorsRequest = 1;
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Route Url="/:name" Method="GET" Call="Test" Cors="true"/>
</Routes>
ClassMethod Test(name as %String) As %Status
{
w "Hello World "_name
Quit $$$OK
}
}
}
I am expecting result like " Hello World Gunwant" from browser ( localhost:57772/widgetsdirect/rest/Gunwant)
From Postman I am getting same result. But from browser service unavailable error I am getting.
Thanks,
Gunwant
Hi Jean,
Yes, you are right. I have set up a Web Application named "/widgetsdirect/rest" via the Management Portal, just namespace name is different.
So while running from browser we need any additional settings ?
Thanks,
Gunwant