web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / 406: Not Acceptable: C...
Copilot Studio
Answered

406: Not Acceptable: Client must accept both application/json and text/event-stream

(1) ShareShare
ReportReport
Posted on by
I have tried several variations in my OpenAPI 2.0 spec but can't seem to crack this one. Here's my latest attempt:
 
  "paths": {
    "/": {
      "post": {
        "tags": [
          "mcp-http-demoApi"
        ],
        "description": "Adds two numbers.",
        "operationId": "Add",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "parameters": [
            {
                "in": "header",
                "name":"Accept",
                "required": true,
                "type": "string",
                "default": "application/json; text/event-stream"
            },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
In the swagger editor, this looks like:
curl -X 'POST' \
  'https://{my}.{api}.azurecontainerapps.io/mcp/' \
  -H 'accept: text/plain' \
  -H 'Accept: application/json; text/event-stream' \
  -H 'Content-Type: application/json' \
  -d '{
"a":5,"b":9
}'
but I still get the 406. I tried putting both MIME types in the "consumes". It ignores anything after the first item.

 
I have the same question (0)
  • Verified answer
    GO-20061201-0 Profile Picture
    on at
    The Accept header wants a comma between the mime types, not a semicolon.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard