function buildRequestFn(requests, config) {
    var httpConfig = {
        method: 'GET',
        url: config.batchEndpointUrl + '?',
        cache: false,
        headers: config.batchRequestHeaders || {}
      },
      encodedUrl, i, request,
      urlParts;

    for (i = 0; i < requests.length; i += 1) {
      request = requests[i];
      urlParts = request.url.split('?');

      encodedUrl = urlParts[0].replace(config.serviceUrl, '');
      if (urlParts.length > 1) {
        encodedUrl += '?' + encodeURIComponent(urlParts[1]);
      }

      if (i > 0) {
        httpConfig.url += '&';
      }

      httpConfig.url += i.toString() + '=' + encodedUrl;
    }

    return httpConfig;
  }
/**
   * Builds the single batch request from the given batch of pending requests.
   * Returns a standard angular httpConfig object that will be use to invoke the $http service.
   * See:
   * https://developers.google.com/storage/docs/json_api/v1/how-tos/batch
   * http://blogs.msdn.com/b/webdev/archive/2013/11/01/introducing-batch-support-in-web-api-and-web-api-odata.aspx
   *
   * @param requests - the collection of pending http request to build into a single http batch request.
   * @param config - the http batch config.
   * @returns {object} - a http config object.
   */
Builds the single batch request from the given batch of pending requests.
Returns a standard angular httpConfig object that will be use to invoke the $http service.

@param requests - the collection of pending http request to build into a single http batch request.
@param config - the http batch config.
@returns {object} - a http config object.
Builds the single batch request from the given batch of pending requests . Returns a standard angular httpConfig object that will be use to invoke the $http service . @param requests - the collection of pending http request to build into a single http batch request . @param config - the http batch config . @returns { object } - a http config object .
function buildRequestFn(requests, config) {
    var httpConfig = {
        method: 'GET',
        url: config.batchEndpointUrl + '?',
        cache: false,
        headers: config.batchRequestHeaders || {}
      },
      encodedUrl, i, request,
      urlParts;
    for (i = 0; i < requests.length; i += 1) {
      request = requests[i];
      urlParts = request.url.split('?');
      encodedUrl = urlParts[0].replace(config.serviceUrl, '');
      if (urlParts.length > 1) {
        encodedUrl += '?' + encodeURIComponent(urlParts[1]);
      }
      if (i > 0) {
        httpConfig.url += '&';
      }
      httpConfig.url += i.toString() + '=' + encodedUrl;
    }
    return httpConfig;
  }
function buildRequestFn ( requests , config ) { var httpConfig = { method : 'GET' , url : config . batchEndpointUrl + '?' , cache : false , headers : config . batchRequestHeaders || { } } , encodedUrl , i , request , urlParts ; for ( i = 0 ; i < requests . length ; i += 1 ) { request = requests [ i ] ; urlParts = request . url . split ( '?' ) ; encodedUrl = urlParts [ 0 ] . replace ( config . serviceUrl , '' ) ; if ( urlParts . length > 1 ) { encodedUrl += '?' + encodeURIComponent ( urlParts [ 1 ] ) ; } if ( i > 0 ) { httpConfig . url += '&' ; } httpConfig . url += i . toString ( ) + '=' + encodedUrl ; } return httpConfig ; }
Builds the single batch request from the given batch of pending requests.
Builds the single batch request from the given batch of pending requests .