[X] I've searched existing issues and found nothing related to my issue.
Describe the feature you want to add
In https://github.com/usebruno/bruno/issues/2441 the request body could be updated. This is useful to convert less human-friendly response bodies into structures that are more legible.
However, since it appears the application relies on the content-type header to determine how to display the result, this mean that while it is possible to convert the response between formats, the contents will only render as the original format.
A common use case is with APIs that return a response in the GeoJSON format. This standard represents spatial objects like polygons and points on a map. It is helpful to be able to see the results as a map instead of as a string of characters.
I have checked the following:
Describe the feature you want to add
In https://github.com/usebruno/bruno/issues/2441 the request body could be updated. This is useful to convert less human-friendly response bodies into structures that are more legible.
However, since it appears the application relies on the
content-type
header to determine how to display the result, this mean that while it is possible to convert the response between formats, the contents will only render as the original format.A common use case is with APIs that return a response in the GeoJSON format. This standard represents spatial objects like polygons and points on a map. It is helpful to be able to see the results as a map instead of as a string of characters.
An example of this in Postman is https://github.com/OrdnanceSurvey/postmanGeoJSON. The GeoJSON response body is inserted into HTML code to be rendered in the response.
Bruno can render similar content in the response correctly already - a GET request of https://leafletjs.com/examples/quick-start/example.html works fine in the "web" preview in the response panel.
Mockups or Images of the feature
The following functions would be exposed in responses, following the same syntax for requests:
This would look like (skipping the HTML generation code):