mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
add -H "Content-Type: application/json" in curl command
This commit is contained in:
@@ -204,7 +204,8 @@ query({"question": "Hey, how are you?"}).then((response) => {
|
|||||||
} else if (codeLang === 'cURL') {
|
} else if (codeLang === 'cURL') {
|
||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\
|
-X POST \\
|
||||||
-d '{"question": "Hey, how are you?"}'`
|
-d '{"question": "Hey, how are you?"}' \\
|
||||||
|
-H "Content-Type: application/json"`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@@ -246,6 +247,7 @@ query({"question": "Hey, how are you?"}).then((response) => {
|
|||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\
|
-X POST \\
|
||||||
-d '{"question": "Hey, how are you?"}' \\
|
-d '{"question": "Hey, how are you?"}' \\
|
||||||
|
-H "Content-Type: application/json" \\
|
||||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
@@ -316,7 +318,8 @@ query(formData).then((response) => {
|
|||||||
`
|
`
|
||||||
} else if (codeLang === 'cURL') {
|
} else if (codeLang === 'cURL') {
|
||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\${getConfigExamplesForCurl(configData, 'formData')}`
|
-X POST \\${getConfigExamplesForCurl(configData, 'formData')} \\
|
||||||
|
-H "Content-Type: application/json"`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@@ -363,6 +366,7 @@ query(formData).then((response) => {
|
|||||||
} else if (codeLang === 'cURL') {
|
} else if (codeLang === 'cURL') {
|
||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\${getConfigExamplesForCurl(configData, 'formData')} \\
|
-X POST \\${getConfigExamplesForCurl(configData, 'formData')} \\
|
||||||
|
-H "Content-Type: application/json" \\
|
||||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
@@ -410,7 +414,8 @@ query({
|
|||||||
} else if (codeLang === 'cURL') {
|
} else if (codeLang === 'cURL') {
|
||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\
|
-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 ''
|
return ''
|
||||||
}
|
}
|
||||||
@@ -460,6 +465,7 @@ query({
|
|||||||
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
return `curl ${baseURL}/api/v1/prediction/${dialogProps.chatflowid} \\
|
||||||
-X POST \\
|
-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" \\
|
||||||
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
-H "Authorization: Bearer ${selectedApiKey?.apiKey}"`
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user