revert content type related to form

This commit is contained in:
Yongtae 2023-07-18 15:09:22 +09:00
parent be49c11f6b
commit ed0bbe7bb7
1 changed files with 3 additions and 9 deletions

View File

@ -309,10 +309,7 @@ async function query(formData) {
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
{
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
body: new URLSearchParams(formData)
body: formData
}
);
const result = await response.json();
@ -356,12 +353,9 @@ async function query(formData) {
const response = await fetch(
"${baseURL}/api/v1/prediction/${dialogProps.chatflowid}",
{
headers: {
Authorization: "Bearer ${selectedApiKey?.apiKey}",
"Content-Type": "application/x-www-form-urlencoded"
},
headers: { Authorization: "Bearer ${selectedApiKey?.apiKey}" },
method: "POST",
body: new URLSearchParams(formData)
body: formData
}
);
const result = await response.json();