lib/collection/request-body.js
function () {
        // Formdata. Goodluck.
        if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) {
            // @todo: implement this, check if we need to return undefined or something.
            return EMPTY;
        }

        if (this.mode === RequestBody.MODES.urlencoded) {
            return PropertyList.isPropertyList(this.urlencoded) ? QueryParam.unparse(this.urlencoded.all()) :
                ((this.urlencoded && _.isFunction(this.urlencoded.toString)) ? this.urlencoded.toString() : EMPTY);
        }

        if (this.mode === RequestBody.MODES.raw) {
            return (this.raw && _.isFunction(this.raw.toString)) ? this.raw.toString() : EMPTY;
        }

        return EMPTY;
    }
function () {
        // Formdata. Goodluck.
        if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) {
            // @todo: implement this, check if we need to return undefined or something.
            return EMPTY;
        }

        if (this.mode === RequestBody.MODES.urlencoded) {
            return PropertyList.isPropertyList(this.urlencoded) ? QueryParam.unparse(this.urlencoded.all()) :
                ((this.urlencoded && _.isFunction(this.urlencoded.toString)) ? this.urlencoded.toString() : EMPTY);
        }

        if (this.mode === RequestBody.MODES.raw) {
            return (this.raw && _.isFunction(this.raw.toString)) ? this.raw.toString() : EMPTY;
        }

        return EMPTY;
    }
function ( ) { // Formdata. Goodluck. if ( this . mode === RequestBody . MODES . formdata || this . mode === RequestBody . MODES . file ) { // @todo: implement this, check if we need to return undefined or something. return EMPTY ; } if ( this . mode === RequestBody . MODES . urlencoded ) { return PropertyList . isPropertyList ( this . urlencoded ) ? QueryParam . unparse ( this . urlencoded . all ( ) ) : ( ( this . urlencoded && _ . isFunction ( this . urlencoded . toString ) ) ? this . urlencoded . toString ( ) : EMPTY ) ; } if ( this . mode === RequestBody . MODES . raw ) { return ( this . raw && _ . isFunction ( this . raw . toString ) ) ? this . raw . toString ( ) : EMPTY ; } return EMPTY ; }
Stringifies and returns the request body.

@note FormData is not supported yet.
@returns {*}
Stringifies and returns the request body .