'API request takes some seconds on react app but not in postman

fellow programmers, There is an API that I created from NodeJS(express).

Problem comes when I call it from my React-App.

When I call same API from Postman it takes miliseconds but when I call it from my React-App it takes around 7-9seconds to resolve its response.

My React-App API resolving time! My React APP Response time

Postman response time: enter image description here

My React Code: API Call Controller Code

Can anyone help! Its bugging me from week. Please and thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source