[Laszlo-dev] Rest Support
elias.khalil at g.ho.st
Sun Feb 24 07:03:12 PST 2008
----- Original Message -----
From: "Henry Minsky" <henry.minsky at gmail.com>
To: "Elias Khalil" <elias.khalil at g.ho.st>
Cc: laszlo-dev at openlaszlo.org
Sent: Sunday, February 24, 2008 3:56:35 PM (GMT+0200) Auto-Detected
Subject: Re: [Laszlo-dev] Rest Support
Is your code running in the SWF or DHTML runtime?
On Sun, Feb 24, 2008 at 8:07 AM, Elias Khalil < elias.khalil at g.ho.st > wrote:
I am trying to call REST APIs from openlaszlo. I tried to make a dataset http request and it worked fine on success. But in case where the REST returns an error like HTTP Error 401 – Unauthorized I can't read the error string or code. It behaves as the following:
On proxied mode: dataset.getErrorString()always return null while in debugger there is a message showing the error type but we can't access it
On non proxied mode: calling dataset.getErrorString() result in error "client could not parse XML from server"
Using Xmlhttprequest is also not helpful where it always cast errors types to http error 500
In order to support calling basic REST APIs, I need to get a clear HTTP Error code and also be able to read the http content in case of error.
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Laszlo-dev