Wednesday, October 16, 2013

How to consume RaaS service( Report as a service), details and sample code

Dim webRequest As HttpWebRequest = DirectCast(Net.WebRequest.Create("URL of Raas service"), HttpWebRequest)
        webRequest.Method = "GET"
        webRequest.ContentType = "application/x-www-form-urlencoded"
        webRequest.Credentials = New NetworkCredential("URL of RaaS service", "token")
        Dim httpResponse As HttpWebResponse
        Dim contentReader As StreamReader
        Try
            httpResponse = DirectCast(webRequest.GetResponse(), HttpWebResponse)
            contentReader = New StreamReader(httpResponse.GetResponseStream())
            Dim readToEnd As String = contentReader.ReadToEnd()
        Catch ex As Exception
            '' Log the exception here
        End Try

No comments:

Post a Comment