revert content type related to form
This commit is contained in:
parent
be49c11f6b
commit
ed0bbe7bb7
|
|
@ -309,10 +309,7 @@ async function query(formData) {
|
||||||
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
|
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
body: formData
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
|
||||||
},
|
|
||||||
body: new URLSearchParams(formData)
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
@ -356,12 +353,9 @@ async function query(formData) {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
|
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
|
||||||
{
|
{
|
||||||
headers: {
|
headers: { Authorization: "Bearer ${selectedApiKey?.apiKey}" },
|
||||||
Authorization: "Bearer ${selectedApiKey?.apiKey}",
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
|
||||||
},
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: new URLSearchParams(formData)
|
body: formData
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue