Replies:

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

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" ]
{

<Routes>
<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

Followers:
Gunwant has no followers yet.
Following:
Gunwant has not followed anybody yet.
Global Masters badges:
Gunwant has no Global Masters badges yet.