"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
- Go to any API
- Click on 'Try Me'
- Ensure a valid Subscription key is selected
- Scroll down, and click
Send
- 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:
What is actually being sent
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.