Header setting is not working. Have to check if body is JSON to parse it. Shall handle file returningin response