update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { request, SmartResponse, type ICoreRequestOptions } from '../core/index.js';
|
||||
import { SmartRequest, SmartResponse, type ICoreRequestOptions } from '../core/index.js';
|
||||
import * as plugins from '../core/plugins.js';
|
||||
|
||||
import type { HttpMethod, ResponseType, FormField } from './types/common.js';
|
||||
@@ -308,7 +308,7 @@ export class SmartRequestClient<T = any> {
|
||||
|
||||
for (let attempt = 0; attempt <= this._retries; attempt++) {
|
||||
try {
|
||||
const response = await request(this._url, this._options);
|
||||
const response = await SmartRequest.create(this._url, this._options);
|
||||
return response as SmartResponse<R>;
|
||||
} catch (error) {
|
||||
lastError = error as Error;
|
||||
|
Reference in New Issue
Block a user