I've thought about that as well, but I still think you should get the
warning shown automatically when $debug==true, since you don't know if
the user is catching the onerror event. And if that's not happening,
the request will still silently fail.

For cross-origin resource sharing in the DHTML runtime it's not
possible to get an error message if the cross-origin request failed.
The only thing we could do is test the HTTP request headers an see, if
we have an

Origin: http://....

header in the list of sent headers. If that's the case, and we get an
error for a xhr request, we could assume that the server didn't send a
corresponding header allowing the cross-origin access.

On Thu, Apr 14, 2011 at 2:32 PM, P T Withington <[email protected]> wrote:
> Propose an API to laszlo-user?
>
> On 2011-04-14, at 04:34, Raju Bitter wrote:
>
>> Flash for quite some time now supports returning the HTTP status code
>> for a URLRequest. I've added support for that to the LzHTTPLoader
>> class for the SWF10 runtime:
>> http://jira.openlaszlo.org/jira/browse/LPP-9894
>>
>> By calling getResponseStatus() it's possible to retrieve the response
>> status code of the last request for a dataset. Currently there is no
>> public API to access the LzHTTPLoader instance, but the method can be
>> reached through someDataset.dataRequest.loader.getResponseStatus().
>> How should that method/value be exposed on the dataset? Should we add
>> an attribute "responsestatus"?
>>
>> DHTML supports response status values already, that means the
>> functionality would be available for unproxied datasets across
>> runtimes.
>
>

Reply via email to