Search code examples
restpostmethodsget

REST API Works in Browser, But Not Client


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!


Solution

  • At first glance it sounds it could be 2 things:

    1. You are not correctly passing API parameters via your client or applet
    2. A problem with authentication or cookie management. Does the API require any type of authorization?
    3. Are you forgetting to set a necessary HTTP header?