feat: add ESLint configuration, update package.json scripts, and create example files for Bun integration
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user