fix: node.js sdk if request is a get data must not exist (#4618)

This commit is contained in:
Valerio Narcisi 2024-05-27 02:48:07 +02:00 committed by GitHub
parent 11275cbaaf
commit af026c5953
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -85,7 +85,7 @@ export class DifyClient {
response = await axios({
method,
url,
data,
...(method !== "GET" && { data }),
params,
headers,
responseType: "json",

View File

@ -42,7 +42,6 @@ describe('Send Requests', () => {
expect(axios).toHaveBeenCalledWith({
method,
url: `${BASE_URL}${endpoint}`,
data: null,
params: null,
headers: {
Authorization: `Bearer ${difyClient.apiKey}`,