Cannot display POST output in JSON format

I am using Postman v6.1.3 to send a POST query in JSON format and results are successfully returned in HTML format. However, when I try to change the output to also show in JSON format, I always get the error message Unexpected ‘<’. I’ve run the same JSON query through another tool, so I believe it is correct and the HTML does return correctly. This also worked before I got a new laptop and re-installed the Postman software. Am I missing something?

@KenBuckman What is the response type? Is it HTML or JSON?
If it’s HTML, it can’t be viewed in JSON format and thus the error is showing up.

@postman-harryi3t, Thanks for your follow up. I was able to resolve the issue, which was related to an incorrect target URL in the Post command.

I have the same issue; please explain the solution in detail.

@science-geoscienti21

Are you really expecting someone to respond to a five year old post.

If you are having a similer issue, I would recommend creating your own post and include details on the API you are calling and what you have tried so far.

If the API you are calling can return different response types, then you usually have to add a query parameter for the response type you want. That is if the API can even support this, which usually means you have to read the API specification.

Btw you replied there, and giving me motivational speech rather you should explain the process which I asked. And I try that what you said but didn’t you get my question

You mean, the “explain the solution in detail”. I got that, but I don’t think anyone will actually respond to that type of question to be honest.

It’s like you are saying “do my job for me”.

Show what you’ve tried. Include screenshots of your current request and response, with a link or details for the API specification and you might have a chance of someone responding.