Currently, return data from API can only return application/json (the default) or text/plain (if plain text is selected.)
The problem with this is that some APIs do not accept either of these return types and/or only accept one and the resulting behavior isn’t desirable.
For example, for my use case is I’m receiving a POST from Twilio for a new incoming text message. The Twilio API does not accept a application/json response and Twilio interprets a plain/text response as a auto-reply and sends a text back to the original sender with the contents of the plain text. I don’t want to trigger an auto-reply, so I’m just stuck.
TWO POSSIBLE SOLUTIONS
Solution #1: Add a “custom” option that would allow the user to type in a custom Content-Type header, and type anything they want into the body of the response. This is essentially what text/plain already is, I’m just suggesting that the user be able to type in their own header rather than it being locked to plain/text. Mockup:
Solution #2: Add text/html as an option. Mockup:
Either of these solves my problem, and while I think solution #1 would solve all use cases ever, solution #2 is likely to cover 99% of use cases as opposed to maybe the 89% of use cases covered by the current options.