async __parseBody(response) {
    // clone the response, so the consumer can also read it out manually as well
    let responseText = await response.clone().text();

    const { jsonPrefix } = this.__config;
    if (typeof jsonPrefix === 'string' && responseText.startsWith(jsonPrefix)) {
      responseText = responseText.substring(jsonPrefix.length);
    }

    let body = responseText;

    if (
      body.length &&
      (!response.headers.get('content-type') ||
        response.headers.get('content-type')?.includes('json'))
    ) {
      try {
        body = JSON.parse(responseText);
      } catch (error) {
        throw new Error(`Failed to parse response from ${response.url} as JSON.`);
      }
    } else {
      body = responseText;
    }
    return body;
  }
@template T
@param {Response} response
@returns {Promise<string|T>}