beckn / beckn-in-a-box

MIT License
6 stars 5 forks source link

Multiple search apis with same response. #2

Closed shreynpatel23 closed 2 years ago

shreynpatel23 commented 2 years ago

If we search a product in search by category name. the response leads us the message_id which we can use to call the onSearch api. The problem here is that we call the onSearch api 5 times which i am not aware that is hardcoded or not but still all the apis are pointing to the same request_url and the request_body is also identical for all the onSearch apis.

The problem here is we get the whole response in the second api response as well and all the other apis after that have the same response. If all the apis are having same response than why it is called 5 times.

The detailed view of the issue can be seen in the screenshots attached.

As you can see that in the first all the search api the request urls are same which are https://qa.box.beckn.org/api/beckn/onSearch and the request payload is Array<{message_id: "486b9fd3-ddad-4bb5-b9d2-0b8ca0908e1a"}>

and in the second and third response of the on_search api the response are same. I have highlighted the ids for better understanding.

response for second on_search request_url for third on_search request_payload for third on_search response for third on_search request url for first on_search request_payload for first on_Search response for first on_search request_url for second on_search request_payload for second on_search