This error occurs when sending an incorrect content-type header to Kong Gateway. Some utilities, such as curl, default to using Content-Type: application/x-www-form-urlencoded. To address the issue, ensure you are sending the header as Content-Type: application/json.
curl -X POST https://mygateway/api/v1 \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Why is the sky blue?"
}
]
}'
Copied!