mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Update content-type header to application/x-www-form-urlencoded in APICodeDialog.js
This commit is contained in:
@@ -310,9 +310,9 @@ async function query(formData) {
|
|||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(formData)
|
body: new URLSearchParams(formData)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
@@ -358,10 +358,10 @@ async function query(formData) {
|
|||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: "Bearer ${selectedApiKey?.apiKey}",
|
Authorization: "Bearer ${selectedApiKey?.apiKey}",
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(formData)
|
body: new URLSearchParams(formData)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user