Azure / api-management-developer-portal

Developer portal provided by the Azure API Management service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Try it"-button in Developer Portal modifies XML payload

schteffy opened this issue · comments

Bug description

When using the Try me-button to test a POST-request in the developer portal, the XML used as payload is inserted into some JSON object before it is being sent. Consequently, the Content-Type is forcefully modified from application/xml to application/json. This leads to an issue where the server is unable to process the request.

I tried making the request using Postman, and it worked as expected. It seems that there might be some unusual processes or actions happening in the developer portal that are causing the problem.

The issue seems to only affect APIs defined with XML as the Content-Type, not JSON.

Reproduction steps

  1. Go to any API
  2. Click on 'Try Me'
  3. Ensure a valid Subscription key is selected
  4. Scroll down, and click Send
  5. The bug appears, and the server is not able to handle the request

Expected behavior

I expect the Try it-functionality to send the request exactly as specified in the API, without making any modifications to the payload before sending it.

Is your portal managed or self-hosted?

Managed

Environment

Tested using the following two setups:

Setup 1

  • Operating system: macOS
  • Browser: Google Chrome

Setup 2

  • Operating system: Windows
  • Browser: Microsoft Edge

Additional context

What is specified to be sent:

image

What is actually being sent

image

Hello @schteffy , thanks for reaching out.
Unfortunately, I was not able to reproduce the issue you described. Can you please share your instance name and the API with the issue, so we ca investigate this further? Feel free to send them to apimportalfeedback@microsoft.com

The issue seems to have been resolved on its own, and as far as I can tell, no updates have been made to the Developer Portal. Since we haven't encountered this bug for some time, I am closing the ticket.