Visualizing responses

1. Adding custom script

2. Invocation method
pm.visualizer.set()
function to display the visualized result in the Visualize tab of the response body.
Code example
pm.visualizer.set()
1.
template
parameter (required):template
is a required parameter, The first parameter is the HTML template string received by Handlebars , which will eventually be rendered under <body>
.You can write <link>
in template
to load external css stylesheets, or use <script>
to load third-party libraries.2.
data
parameter (optional):data
to receive an object that is used to replace the template string variable of Handlebars.
3.
options
parameter (optional):options
method. It is used to configure how Handlebars compiles the template string passed in the first parameter.pm.getData(cb: (err, data) => void)
pm.visualizer.set()
.1.
error
error message2.
data
through the second parameter pm.visualizer.set()
Worker
and indexedDB
in the window
object in the template string.Modified atΒ 2024-12-31 08:33:46