Reputation: 2576
I have end point URL, and sample JSON request payload, when I tried to hit(POST) the end point URL through postman it's responding back that the Username field is missing in request payload. But the same request payload is working fine with our internal tool which is used to call the same end-point URL. Even though I set the basic authentication in postman, but still observed the same error message.
Is there any way to identify the sample request payload by using end point URL? or any other way to identify the root cause for this issue and what would be the fix?
Upvotes: 0
Views: 6122
Reputation: 2387
if you want to see the request payload, you may have a look at this in paragraph "Request/response related properties" You can check headers, data, url etc. by doing ie.
console.log(request.data)
Upvotes: 1
Reputation: 1751
Since you are using a post request to pass the username and password to the api you have to specify it as a post body, and the picture above shows how to do that with postman.
Upvotes: 0
Reputation: 132
As you mentioned in your Question that your URL is responding back that the
'Username' field is missing in request payload
And, it is working fine with your internal tool to hit the same URL, I recommend you should check the Payload which you are sending in your POST Request.
As per the error response obtained, you are not sending 'Username' in your payload which is necessary for the POST Request to complete.
I'd recommend you to check once again:
Upvotes: 1
Reputation: 5865
RESTful web services aren't like SOAP ones where you can grab the WSDL and be (almost certainly!) sure about the expected inputs and outputs. Documenting the request/response structure of a RESTful web service is entirely up to the vendor/maintainer (see Should a RESTful API have a schema?).
If you're 100% sure that you're using Postman correctly, I'd suggest:
Upvotes: 1