@@ -85,7 +85,7 @@ export class DifyClient {
response = await axios({
method,
url,
- data,
+ ...(method !== "GET" && { data }),
params,
headers,
responseType: "json",
@@ -42,7 +42,6 @@ describe('Send Requests', () => {
expect(axios).toHaveBeenCalledWith({
url: `${BASE_URL}${endpoint}`,
- data: null,
params: null,
headers: {
Authorization: `Bearer ${difyClient.apiKey}`,