code: function formatPostData(data) { //, contentType
      // If it's a string, we assume it's properly encoded
      if (typeof(data) === 'string') return data;
  
      var queryString = [];
  
      for (var key in data) {
        queryString.push(
          encodeURIComponent(key) + '=' + encodeURIComponent(data[key])
        );
      }
  
      return queryString.join('&').replace(/\+/g, '%20');
    }
docs: tb_require('../../helpers.js') tb_require('../environment.js')