static parse(uri, request, requestType, progressUpdated, headersReceived,
      config) {
    const headers = new shaka.net.HttpFetchPlugin.Headers_();
    shaka.util.MapUtils.asMap(request.headers).forEach((value, key) => {
      headers.append(key, value);
    });

    const controller = new shaka.net.HttpFetchPlugin.AbortController_();

    /** @type {!RequestInit} */
    const init = {
      // Edge does not treat null as undefined for body; https://bit.ly/2luyE6x
      body: request.body || undefined,
      headers: headers,
      method: request.method,
      signal: controller.signal,
      credentials: request.allowCrossSiteCredentials ? 'include' : undefined,
    };

    /** @type {shaka.net.HttpFetchPlugin.AbortStatus} */
    const abortStatus = {
      canceled: false,
      timedOut: false,
    };

    const minBytes = config.minBytesForProgressEvents || 0;

    const pendingRequest = shaka.net.HttpFetchPlugin.request_(
        uri, request, requestType, init, abortStatus, progressUpdated,
        headersReceived, request.streamDataCallback, minBytes);

    /** @type {!shaka.util.AbortableOperation} */
    const op = new shaka.util.AbortableOperation(pendingRequest, () => {
      abortStatus.canceled = true;
      controller.abort();
      return Promise.resolve();
    });

    // The fetch API does not timeout natively, so do a timeout manually using
    // the AbortController.
    const timeoutMs = request.retryParameters.timeout;
    if (timeoutMs) {
      const timer = new shaka.util.Timer(() => {
        abortStatus.timedOut = true;
        controller.abort();
      });

      timer.tickAfter(timeoutMs / 1000);

      // To avoid calling |abort| on the network request after it finished, we
      // will stop the timer when the requests resolves/rejects.
      op.finally(() => {
        timer.stop();
      });
    }

    return op;
  }
@param {string} uri
@param {shaka.extern.Request} request
@param {shaka.net.NetworkingEngine.RequestType} requestType
@param {shaka.extern.ProgressUpdated} progressUpdated Called when a
  progress event happened.
@param {shaka.extern.HeadersReceived} headersReceived Called when the
  headers for the download are received, but before the body is.
@param {shaka.extern.SchemePluginConfig} config
@return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}
@export