Use Fetch to get data from the server, sometimes return a Promise object, sometimes return a json object?

I use the following code to get data from the server, sometimes return a Promise object, sometimes return a json object, how can I write to ensure that I must return a json object?

postFromServer ( requestParam ) {
        const _self = this;
        let url = requestParam["url"] || "";
        let headers = requestParam["headers"] || "";
        let postBody = requestParam["postBody"] || "";
        let code = requestParam["code"] || 200;
        let consoleMessage = requestParam["consoleMessage"] || false;
        let response = _self.sendToServer( url, "POST", headers, postBody );

        return response.then(function(value) {
            if ( consoleMessage === true ) {
                console.log("common-helper-es6 postFromServer === ", value)
            }
            return value;
        }, function(error) {
            console.log("postFromServer error === ", error)
        });
    },
Jun.15,2021

Promise.then (res= > return res.json ()). Then (res= > console.log (res));
convert to JOSN format at the first then, and get this object at the second then

Menu