This project is archived and is in readonly mode.

#1030 ✓resolved
Jasper

Request for improved documentation regarding request methods

Reported by Jasper | October 9th, 2010 @ 10:25 PM | in 1.3.1 (closed)

I've just sorted a problem regarding sending request headers other than post and get. Even the built-in methods (DELETE, PUT) don't work unless the emulation option in Request is set to false.

window.addEvent('domready' , function(){

document.getElement('form').addEvent('submit' , function(event){
    event.stop();
    var r = new Request.HTML({
        'url' : '/index/mootools-request',
        'method' : 'DELETE',
        'onComplete' : function(h,a){
            console.log(a.shift());
        }
    }).send();
});

});

The above results in a POST method being sent.

window.addEvent('domready' , function(){

document.getElement('form').addEvent('submit' , function(event){
    event.stop();
    var r = new Request.HTML({
        'url' : '/index/mootools-request',
        'method' : 'DELETE',
        'onComplete' : function(h,a){
            console.log(a.shift());
        },
        'emulation' : false
    }).send();
});

});

Results in a DELETE method being sent.

This is unclear from the documentation (but very clear in uncompressed source) so I'm just requesting improved documentation surrounding this.

Thanks.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages