function createRequestXhr(request, accessToken) {
  var url = request.url(accessToken);
  var xhr = new window.XMLHttpRequest();
  xhr.open(request.method, url);
  Object.keys(request.headers).forEach(function(key) {
    xhr.setRequestHeader(key, request.headers[key]);
  });
  return xhr;
}
// for Mapbox's internal client.
for Mapbox's internal client.
for Mapbox ' s internal client .
function createRequestXhr(request, accessToken) {
  var url = request.url(accessToken);
  var xhr = new window.XMLHttpRequest();
  xhr.open(request.method, url);
  Object.keys(request.headers).forEach(function(key) {
    xhr.setRequestHeader(key, request.headers[key]);
  });
  return xhr;
}
function createRequestXhr ( request , accessToken ) { var url = request . url ( accessToken ) ; var xhr = new window . XMLHttpRequest ( ) ; xhr . open ( request . method , url ) ; Object . keys ( request . headers ) . forEach ( function ( key ) { xhr . setRequestHeader ( key , request . headers [ key ] ) ; } ) ; return xhr ; }
for Mapbox's internal client.
for Mapbox ' s internal client .