code: function parseType(type) {
    type = type || '';
    type = type.split(';')[0];
    type = type.toLowerCase();
    type = type.trim();
  
    switch (type) {
      case 'text/x-json':
      case 'application/json':
        return 'json';
      case 'application/x-www-form-urlencoded':
        return 'form';
      case 'text/html':
      case 'application/xhtml+xml':
        return 'html';
      case 'text/xml':
      case 'application/xml':
        return 'xml';
      case 'text/javascript':
      case 'application/javascript':
        return 'js';
      case 'text/css':
        return 'css';
      case 'text/plain':
        return 'txt';
      case 'application/octet-stream':
        return 'bin';
      default:
        return 'bin';
    }
  }
docs: /*
  Helpers