Muhammad Qasim I think your request is missing the body section or is incorrectly formatted. Are you using a custom question answering KB deployment prediction URL? In that case, you can use the Get Prediction URL button to copy the curl request and then use the same.
For example, I have used this option to copy the curl request and run the same with minimal parameters.
curl -X POST "https://<your_resource>.cognitiveservices.azure.com/language/:query-knowledgebases?projectName=<project_name>&api-version=2021-10-01&deploymentName=production" -H "Ocp-Apim-Subscription-Key: <your_key>" -H "Content-Type: application/json" -d "{\"top\":3,\"question\":\"This is test\",\"includeUnstructuredSources\":true,\"confidenceScoreThreshold\":\"0.4\",\"answerSpanRequest\":{\"enable\":true,\"topAnswersWithSpan\":1}}}"
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.