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.
Related
Postman is not able to display the exception when getting response code 500 "internal server error". It is displaying the response correctly while getting 200 response code.
I am very new with Postman any idea why it is not displaying the error message? Is there any config that I need to do on postman side.
There is no response body, which can be displayed by postman. Public facing APIs prolly shouldn't provide any more details.
I'm trying to replicate a post request done normally by a website form via postman but the server returns 500 error.
the form website URL that I'm dealing with is here.
what I have done so far is investigate the network request using chrome or safari dev tools, copy the request as cURL, import the cURL in postman and do the request.
what can be the possible reasons for the failure and what are the alternative ways to achieve the same result?
Postman Headers:
Most probably you must have used invalid request body. The browser shows parsed json body and you might have copied incomple request body.
To get full body click view source and copy the full content.
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
localhost:8188/wh/authorizewithdev?successUrl=http://localhost:8188/wh/noop
I have the URL as above.
When I hit the URL manually, it redirects to localhost:8188/wh/noop
If we see the Network by pressing F12, we can see two API hits.
One is localhost:8188/wh/authorizewithdev?successUrl=http://localhost:8188/wh/noop
with status code 303, in that we can see the response headers and it has the cookie_ticket with some value. ( Ultimate goal is that I need this cookie_ticket so that I can perform other actions with the cookie_ticket)
Second one is localhost:8188/wh/noop with status code 200 and in this if we see the response headers and request header. But in this hit the cookie_ticket will be passed as a request header. Cookie_ticket will not be present in the response header.
So when I hit the post(localhost:8188/wh/authorizewithdev?successUrl=http://localhost:8188/wh/noop) and tried to get the header I am able to get the response headers of the second one. But the cookie_ticket is not present.So is there any option to get the response headers of the first API hit or is there any option to get the request headers of the second API.
Please share your thoughts
I got it by using
given().redirects().follow(false).when()
I'm trying to test some calls but the content-type is text no matter what I do. I try to specify as json or xml but it doesn't matter and not sure why:
I suspect you're getting confused about the Content-Type column, which shows the Content-Type of the response, not the request.
Double-click the Web Session to inspect the request and response using the Inspectors. The Request is shown in the top set of tabs while the Response is shown in the bottom set.