usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.56k stars 1.27k forks source link

Add functions to set response headers #3527

Open drwelby opened 8 hours ago

drwelby commented 8 hours ago

Description

This adds the functions to enable the features requested in https://github.com/usebruno/bruno/issues/3495

In short, this allows the ability to modify the headers in the response object res. This is primarily useful to take response contents and convert them to a different content type. Changing the content-type header allows Bruno to render the new response correctly. This reproduces the functionality found in Postman's "visualizer" concept.

Attached is a screenshot demonstrating converting a JSON response of geospatial data into a map view.

Contribution Checklist:

Screenshot 2024-11-21 at 10 23 30 AM