Getting response as “Unsupported content type” while making a request using client.request in my frontend code. The body and header values are exactly same as it is being used in postman where m getting the desired result.
Following is the response, getting in browser through app code;
The “Content-Type” that you may pass is for the request body content type.
In the APIs response in Postman, what is the content type received? Are you also passing the “Accept” header with a particular content type?
In postman, I’m getting ‘application/java; charset=UTF-8’ as Content-Type in response. As, it is expected to come as ‘application/json; charset=UTF-8’.
Also, I’m not passing accept header in my code. However, I’ve tested after giving accept as ‘application/json’.