mercredi 30 septembre 2015

flash app working when run from flash builder 4.6.0, not working when .html file is run?

My problem after building the project in flash builder 4.7 with sdk version 4.0A is as follows:-

1) when i run build-release folder from within flash builder the request from app to server works (the request is initiated in click event).

2) when i run the .html file from projects build-release folder the request is not even initiated in browser network log.

I'm using flash builder 4.7 with sdk 4.0A installed and selected. Since I'm new to actionscript and flash builder sdk, please a detailed answer will be heartly appreciated.

delete request not being sent from browser the code is like:-

public function sendDelete(params:Object):void{
        var request:URLRequest = new URLRequest(url);
        request.method = URLRequestMethod.POST;
        request.contentType = "application/json";
        request.requestHeaders = [new URLRequestHeader('X-HTTP-Method-Override', 'DELETE')];
        request.data = JSON.stringify(params);
        loader.load(request);
    }  

app when run/debug from flash builder the request get issued (seen in browsers network log), but when the app is build and run from build-release folder (i.e. running .html file) the request does not get issued (not seen in browsers network log). But if I remove the line " request.requestHeaders = [new URLRequestHeader('X-HTTP-Method-Override', 'DELETE')];" the request works even from build-release folder.

Aucun commentaire:

Enregistrer un commentaire