All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.js.common.dao.response.js Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
/*
Response object contains the response status, statusKey, and text of the qiven request.
*/
function Response(response){
    response = response || {
        status: null,
        responseText: null
    };
    const statusKey = responseStatusMapper.getKeyOf(response.status);
    
    this.statusKey = statusKey;
    this.status = response.status;
    this.body = response.responseText;
    
    this.toString = function(){
        return this.status + ": " + this.statusKey + " - " + this.body;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy