blueocean-core-js/src/js/parameter/rest/ParameterApi.js
function prepareOptions(body) {
    const fetchOptions = Object.assign({}, fetchOptionsCommon);
    if (body) {
        try {
            fetchOptions.body = JSON.stringify(body);
        } catch (e) {
            console.warn('The form body are not added. Could not extract data from the body element', body);
        }
    }
    return fetchOptions;
}
function prepareOptions(body) {
    const fetchOptions = Object.assign({}, fetchOptionsCommon);
    if (body) {
        try {
            fetchOptions.body = JSON.stringify(body);
        } catch (e) {
            console.warn('The form body are not added. Could not extract data from the body element', body);
        }
    }
    return fetchOptions;
}
function prepareOptions ( body ) { const fetchOptions = Object . assign ( { } , fetchOptionsCommon ) ; if ( body ) { try { fetchOptions . body = JSON . stringify ( body ) ; } catch ( e ) { console . warn ( 'The form body are not added. Could not extract data from the body element' , body ) ; } } return fetchOptions ; }
Helper method to clone and prepare the body if attached
@param body - JSON object that we want to sent to the server
@returns {*} fetchOptions
Helper method to clone and prepare the body if attached