mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 02:45:53 +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({
|
response = await axios({
|
||||||
method,
|
method,
|
||||||
url,
|
url,
|
||||||
data,
|
...(method !== "GET" && { data }),
|
||||||
params,
|
params,
|
||||||
headers,
|
headers,
|
||||||
responseType: "json",
|
responseType: "json",
|
||||||
|
@ -42,7 +42,6 @@ describe('Send Requests', () => {
|
|||||||
expect(axios).toHaveBeenCalledWith({
|
expect(axios).toHaveBeenCalledWith({
|
||||||
method,
|
method,
|
||||||
url: `${BASE_URL}${endpoint}`,
|
url: `${BASE_URL}${endpoint}`,
|
||||||
data: null,
|
|
||||||
params: null,
|
params: null,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${difyClient.apiKey}`,
|
Authorization: `Bearer ${difyClient.apiKey}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user