startStream_(request, hostname) {
    const methodDescriptor = request.getMethodDescriptor();
    let path = hostname + methodDescriptor.getName();

    const xhr = this.xhrIo_ ? this.xhrIo_ : new XhrIo();
    xhr.setWithCredentials(this.withCredentials_);

    const genericTransportInterface = {
      xhr: xhr,
    };
    const stream = new GrpcWebClientReadableStream(genericTransportInterface);
    stream.setResponseDeserializeFn(
        methodDescriptor.getResponseDeserializeFn());

    const metadata = request.getMetadata();
    for(const key in metadata) {
      xhr.headers.set(key, metadata[key]);
    }
    this.processHeaders_(xhr);
    if (this.suppressCorsPreflight_) {
      const headerObject = toObject(xhr.headers);
      xhr.headers.clear();
      path = GrpcWebClientBase.setCorsOverride_(path, headerObject);
    }

    const requestSerializeFn = methodDescriptor.getRequestSerializeFn();
    const serialized = requestSerializeFn(request.getRequestMessage());
    let payload = this.encodeRequest_(serialized);
    if (this.format_ == 'text') {
      payload = googCrypt.encodeByteArray(payload);
    } else if (this.format_ == 'binary') {
      xhr.setResponseType(XhrIo.ResponseType.ARRAY_BUFFER);
    }
    xhr.send(path, 'POST', payload);
    return stream;
  }
@private
@template REQUEST, RESPONSE
@param {!Request<REQUEST, RESPONSE>} request
@param {string} hostname
@return {!ClientReadableStream<RESPONSE>}