templates/protractor.mock.js
function _execute(httpMethod, urlSuffix, options, errorMessage) {
        const opts = {
            headers: {
                'Content-Type': 'application/json',
                'ngapimockid': ngapimockid
            }
        };

        if (options !== undefined) {
            opts.json = options;
        }

        return _handleRequest(httpMethod, urlSuffix, opts, errorMessage);
    }
function _execute(httpMethod, urlSuffix, options, errorMessage) {
        const opts = {
            headers: {
                'Content-Type': 'application/json',
                'ngapimockid': ngapimockid
            }
        };

        if (options !== undefined) {
            opts.json = options;
        }

        return _handleRequest(httpMethod, urlSuffix, opts, errorMessage);
    }
function _execute ( httpMethod , urlSuffix , options , errorMessage ) { const opts = { headers : { 'Content-Type' : 'application/json' , 'ngapimockid' : ngapimockid } } ; if ( options !== undefined ) { opts . json = options ; } return _handleRequest ( httpMethod , urlSuffix , opts , errorMessage ) ; }
Executes the api call with the provided information.
@param httpMethod The http method.
@param urlSuffix The url suffix.
@param options The options object.
@param errorMessage The error message.
@return {Promise} The promise.
@private
Executes the api call with the provided information .