mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-25 19:01:06 +03:00
Merge pull request #554 from Yongtae723/fix_bug/curl_command
add -H "Content-Type: application/json" in curl command
This commit is contained in:
@@ -207,7 +207,8 @@ query({"question": "Hey, how are you?"}).then((response) => {
|
||||
} else if (codeLang === 'cURL') {
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\
|
||||
-d '{"question": "Hey, how are you?"}'`
|
||||
-d '{"question": "Hey, how are you?"}' \\
|
||||
-H "Content-Type: application/json"`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@@ -252,6 +253,7 @@ query({"question": "Hey, how are you?"}).then((response) => {
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\
|
||||
-d '{"question": "Hey, how are you?"}' \\
|
||||
-H "Content-Type: application/json" \\
|
||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||
}
|
||||
return ''
|
||||
@@ -322,7 +324,8 @@ query(formData).then((response) => {
|
||||
`
|
||||
} else if (codeLang === 'cURL') {
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\${getConfigExamplesForCurl(configData, 'formData')}`
|
||||
-X POST \\${getConfigExamplesForCurl(configData, 'formData')} \\
|
||||
-H "Content-Type: multipart/form-data"`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@@ -369,6 +372,7 @@ query(formData).then((response) => {
|
||||
} else if (codeLang === 'cURL') {
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\${getConfigExamplesForCurl(configData, 'formData')} \\
|
||||
-H "Content-Type: multipart/form-data" \\
|
||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||
}
|
||||
return ''
|
||||
@@ -419,7 +423,8 @@ query({
|
||||
} else if (codeLang === 'cURL') {
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\
|
||||
-d '{"question": "Hey, how are you?", "overrideConfig": {${getConfigExamplesForCurl(configData, 'json')}}'`
|
||||
-d '{"question": "Hey, how are you?", "overrideConfig": {${getConfigExamplesForCurl(configData, 'json')}}' \\
|
||||
-H "Content-Type: application/json"`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@@ -472,6 +477,7 @@ query({
|
||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||
-X POST \\
|
||||
-d '{"question": "Hey, how are you?", "overrideConfig": {${getConfigExamplesForCurl(configData, 'json')}}' \\
|
||||
-H "Content-Type: application/json" \\
|
||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||
}
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user