Is it possible to do the same as the VB code snippet below, ie; Send a request 
to a website and retrieve the response (Get Response).

---
Dim uri As String = 
"http://api.microsofttranslator.com/v2/Http.svc/Translate?appId="; & _
                            appID & "&text=" & textToTranslate & "&from=" & 
fromLang & "&to=" & toLang

            Dim request As HttpWebRequest = CType(WebRequest.Create(uri), 
HttpWebRequest)

            Try
                Using response As WebResponse = request.GetResponse
                    Dim strm As Stream = response.GetResponseStream
                    Using sr As New StreamReader(strm)
                        translation = sr.ReadToEnd
                    End Using
                End Using
            Catch ex As WebException
                MessageBox.Show("Ensure that you are connected to the 
internet.", _
                                "Translator", MessageBoxButton.OK, 
MessageBoxImage.Stop)
                Exit Function
            End Try

----
Thanks,

Paul;


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to