I have used Axios for fetching my data to client side from my API but my Get request didn't work well and axios shows some error.
Here i add my code and problem as Screenshot..
I have database in backendless, where I am trying to make POST request. If I open rest console in backendless admin page, there is no problem with making correct POST request. However when I want to make POST from postman it doesn't work, I get error
"code": 8002,
"message": "Could not parse request with message: Error decoding json body: null, status code 400, headers POST
Here is screenshot from backendless as well as from postman. I don't understand, why it is working only from backendless console. Could someone help me, where is the problem? Thanks
You should make POST request with JSON body.
To do it, add
Content-Type: application/json header and define the json body in raw Body tab
I found it confusing too, before I watched a video and realized that I needed to type into the text editor under the Body tab directly under the POST request URL, and not in the output section.
screenshot from postman
In my Springboot App, my local API calls a Thridparty API, format the response and send to the UI.
At a particular usecase I am geting a 400 Exception with a JSON response by calling third party Api directly in Postman which is good, but In my app, when I catch the exception all I see is a 400 Bad Request and I dont get the JSON response.
Exception handling for HttpClientException to get the JsonResponse
Developer tool on Chrome as well postman don't show reason phrase of Response message. ReasonPhrase doesn't show either in response body or in response header. how to view it.
I already asked this question but my wordings were poor.
Assuming my API response code is 404, My goal is to get the JSON response body of that error API. Sure I can get the response code, but how about the response body?