When you call the endpoints please make sure to set the content-type header with its expected values, for example Json will use application/json, XML will use application/XML, for CSV use text/plain
Also you must ensure to send JSON object or JSON array if you are using endpoints which expect the same. Do not send JSON object as a string and expect output