
var Module = new Class({
    Binds: ['send'],
    Implements:[Events],
    path:null,

    initialize: function(path){
        this.path = path;
    },

    send: function(args){
        return Module.doRequest(this.path, args);
    }
});

//static methods

Module.doRequest = function(path, args){
    try {
        var result = new Request({
            url:path,
            async:false,
            evalScripts: false
        }).post(args);

        if (result.isSuccess())
            return result.response.text;
        else return null;
    } catch(e){
        return null;
    }
}