I’ve designed an API get method and it’s behaving strange while requesting response when the call is made through postman or even through browser.
Is this a bug?
Screenshot 1 shows the results when the request is split in two lines which is EXPECTED result, where as Screenshot uses the same URI in single line and returns error which is wrong behavior. Please advise.
While we are working on the fix, could you make the following changes to your request and example:
Remove the newline character after ‘showroom’ (Screenshot 1)
Add ‘showroom’ after ‘{{baseurl}}/’ in your example, (you may have missed this)
The newline character is currently resulting in the ‘showroom’ segment being stripped from the request (Screenshot 1). This is why it is matching with the example, which does not have the ‘showroom’ segment.
UPDATE : To resolve the below described issue, I removed the ‘showroom’ from {{baseurl}} and added to the requests and examples and its working now. This is worth looking again.
Hi Pranaya,
I didn’t understand about inclusion of newline character in this request. I don’t have any newline added to this request, rather it’s a request in single line.
The request URI (screenshot 1) is obtained from the Postman documentation created as part of the design which has this structure in place.
‘showroom’ is part of {{baseurl}}, hence not added in example. When I added ‘showroom’ to example, it worked for request (mentioned in screenshot 2). I noticed, for few other request examples needed this addition.
It still didn’t make sense. (some are working without the addition and some not - doubting consistency).
After addition of ‘showroom’ as suggested (working one), the curl script looks like below which is wrong and will fail again when it is consumed.