INNER CODE UNIT · TypeScript
res
caura-ai/caura · clients/typescript/src/index.ts:290
res = await this.fetchImpl(this.baseUrl + path, {
method,
headers: this.headers,
body: serializedBody,
signal: controller.signal,
// fetch re-sends X-API-Key to a redirect target, even cross-origin
// or from https to http, so a redirect is an error (L-66).
redirect: "error",
});
} catch (cause) {
throw new TransportError(cause);
}
await raiseForStatus(res);
return await readResponseJson(res);
} finally {
clearTimeout(timer);
}
}