mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: node.js sdk if request is a get data must not exist (#4618)
This commit is contained in:
parent
11275cbaaf
commit
af026c5953
|
@ -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({
|
||||
method,
|
||||
url: `${BASE_URL}${endpoint}`,
|
||||
data: null,
|
||||
params: null,
|
||||
headers: {
|
||||
Authorization: `Bearer ${difyClient.apiKey}`,
|
||||
|
|
Loading…
Reference in New Issue
Block a user