[OpenLayers-Dev] OpenLayers Ajax in trunk
tschaub at openplans.org
Sun Feb 24 13:34:04 EST 2008
Eric Lemoine wrote:
> On Sat, Feb 23, 2008 at 9:49 PM, Sean Gillies <sgillies at frii.com> wrote:
>> Eric Lemoine wrote:
>> > The OpenLayers Ajax code doesn't allow for other HTTP methods than GET and POST!
>> Is anybody currently relying on this feature of Ajax.js?
> "Feature" ?? ;-)
> FYI Tim Schaub has started working on new XHR support in OpenLayers.
Yeah, I recognize I sound a bit like a broken record, but I want to get
out from under this hacked ex-Prototype.js mess.
I mentioned the POST/GET problem (limit to those verbs) to Chris a bit
ago as another reason to ditch the whole thing. I don't see value in
continuing to fix this code (though that one is an easy fix).
So, I've put together a proposal for what I think is a better solution:
(Note that all code on that wiki page and in the sandbox mentioned there
was written without testing. I'm confident that it will all work in the
end but will not be surprised if someone points out typos.)
Basically, I like the XMLHttpRequest interface. I just think we need a
few simple things to capture common patterns in using XMLHttpRequest.
For me, this is captured in the "issue" function in my Request.js .
I know others like the loadURL signature. I don't see the need for
onComplete *and* onFailure (since there are many ways "failure" can
occur - including failure to parse XML which means your onComplete
function still needs "failure" checking code), but they are easy to
support as long as we keep loadURL around.
Interested to hear any feedback.
> That new code will support PUT and DELETE. Good Thing!
> Dev mailing list
> Dev at openlayers.org
More information about the Dev