Hi,
I am hitting the url to get a response in HTML Format. But I could not able to get it. I have added the header as Accept - text/html. But still I could not able to visualize in HTML Format. I have attached the image of the response which I got.
From personal experience you need to add pm.visualizer to the test tab, you can find the brewery tutorial to guide you through it (recommended) but this is the gist of the code
The ‘Content-Type’ header would need to be in the response headers, not the request headers.
The request headers are those that you would send with your GET request.
The response headers are those that are sent back to you from the server.
more info on Content-Type here;
It’s also worth noting that the response in your screenshot, generally speaking, doesn’t look like HTML, it looks more like JSON to me.
So if you want to visualise this in HTML format, I think you would have to try out @dxlmx’s suggestion.
Sorry for the inconvenience and for the delayed response. This post is mistakenly created again.
Thanks for your @dxlmx response. This code is useful for visualize in HTML format. But I want to get the response itself in HTML format. [I got the reply from @w4dd325 in another post which I have created in the same topic. Content type response cannot be changed by changing the Content type request header]
and @w4dd325 Thank you for the response. Both replies are useful for me.
You’re quite welcome and hope you get the answer you need. I’m also currently trying to bring the backend response to the frontend. And finding the answer has been difficult. Good luck!