function inferResponseType(src) {
  var fileName = getFileNameFromURL(src);
  var dotLastIndex = fileName.lastIndexOf('.');
  if (dotLastIndex >= 0) {
    var extension = fileName.slice(dotLastIndex, src.search(/\?|#|$/));
    if (extension === '.glb') {
      return 'arraybuffer';
    }
  }
  return 'text';
}
Infer response-type attribute from src.
Default is text (default XMLHttpRequest.responseType)
and arraybuffer for .glb files.

@param {string} src
@returns {string}