[MOCK] Simple Get Request is returning 404 not found error


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.

Screenshot 1

Screenshot 2

Appreciate your help


Hey Sreeju, Can you please add screenshots of your examples too?

Screenshot of example

Hi Sreeju,
Newline characters in requests currently result in the unexpected behavior you are seeing. We are tracking this here: https://github.com/postmanlabs/postman-app-support/issues/4267

While we are working on the fix, could you make the following changes to your request and example:

  1. Remove the newline character after ‘showroom’ (Screenshot 1)
  2. 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.

1 Like

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.

  1. The request URI (screenshot 1) is obtained from the Postman documentation created as part of the design which has this structure in place.

  1. ‘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.