applyRequest_(request, data = {}, useHeaders = this.config_.useHeaders) {
    if (!this.config_.enabled) {
      return;
    }

    const output = this.getGenericData_(data);

    if (useHeaders) {
      const headers = shaka.util.CmcdManager.toHeaders(output);
      if (!Object.keys(headers).length) {
        return;
      }

      Object.assign(request.headers, headers);
    } else {
      const query = shaka.util.CmcdManager.toQuery(output);
      if (!query) {
        return;
      }

      request.uris = request.uris.map((uri) => {
        return shaka.util.CmcdManager.appendQueryToUri(uri, query);
      });
    }
  }
Apply CMCD data to a request.

@param {!shaka.extern.Request} request The request to apply CMCD data to
@param {!CmcdData} data The data object
@param {boolean} useHeaders Send data via request headers
@private