Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"@babel/runtime": "^7.23.2",
"@types/jsonwebtoken": "^9.0.5",
"@types/qs": "^6.9.10",
"axios": "0.x",
"axios": "^0.29.0",
"faye": "^1.4.0",
"follow-redirects": "1.15.6",
"form-data": "^4.0.0",
Expand Down
7 changes: 4 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as https from 'https';
import * as axios from 'axios';
import * as Faye from 'faye';
import { jwtDecode } from 'jwt-decode';
import AxiosProgressEvent from 'axios';
import AxiosProgressEvent, { AxiosResponse } from 'axios';

import { Personalization } from './personalization';
import { Collections } from './collections';
Expand Down Expand Up @@ -668,8 +668,8 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
this.send('request', method, options);

try {
const response = await this.request(this.enrichKwargs({ method, ...options }));
return this.handleResponse(response);
const response = await this.request<AxiosResponse<T>, T>(this.enrichKwargs({ method, ...options }));
return this.handleResponse<T>(response);
} catch (error) {
const err = error as StreamApiError<T>;
if (err.response) return this.handleResponse(err.response);
Expand All @@ -694,6 +694,7 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
timeout: 0,
maxContentLength: Infinity,
maxBodyLength: Infinity,
// @ts-ignore
onUploadProgress,
},
});
Expand Down
Loading