Reputation: 3821
I am developing a REST API, and have found a very interesting problem.
When I access the resources in a web browser (in my case Chrome), everything works fine. However, when I access the resources using a REST client (Google Chrome plugin, web-based client, and a Java applet), NONE of the variables pass to the API. This happens both with GET and POST methods.
I have absolutely no idea why this would be the case, and it's proving very difficult to test the methods before putting them into production (especially with POST methods).
Please help!
Upvotes: 1
Views: 3923
Reputation: 535
Faced the same problem I was returning the fetch function from a different file and loading it up using useEffect, This somehow caused the application not to get information initially ended up writing the fetch request in the same file and running it in useEffect
Upvotes: 0
Reputation: 2008
Do you have control of the API also or is it a third party API? If so, do the params arrive at all or do they arrive empty? What's the error code? - a 403 not authorized (which would make sense if the key doesn't pass) or something else due to missing params.
Try the intermediate step of doing it with CURL form the command line - that'll give you more detail on what's coming back.
Upvotes: 0
Reputation: 7877
At first glance it sounds it could be 2 things:
Upvotes: 1