Forum Discussion

kumar25's avatar
kumar25
New Contributor II
3 years ago

How to pass HTTP codes in JSON output

Hi,

I have a JSON like below, have to pass the value of StatusCode into HTTP Header. I am using JSON Formatter, but incase of Failure also it gives 200 with the actual code in the JSON payload. Help me in how to handle this

JSON:
{
“StatusCode”:“500”,
“StatusMessage”:“Success”
}