feat: add ESLint configuration, update package.json scripts, and create example files for Bun integration

This commit is contained in:
2025-08-20 13:20:59 -04:00
parent 15a6f1ac81
commit b12aef225a
24 changed files with 464 additions and 128 deletions

View File

@@ -38,6 +38,10 @@ export class HttpRequests {
if (httpMethodsThatMustNotHaveBody.includes(method)) {
requestOptions.body = undefined;
} else {
if (requestOptions.body && typeof requestOptions.body !== 'string') {
requestOptions.body = JSON.stringify(requestOptions.body);
}
}
return this.makeRequest<T>(path, requestOptions, abortController, this._requestTimeoutDuration);
@@ -48,6 +52,7 @@ export class HttpRequests {
try {
const requestPath = `${this._baseUri}${path}`;
const response = await fetch(requestPath, options);
if (!response.ok) {