Forum Discussion

forkbattery's avatar
forkbattery
Occasional Contributor
10 years ago
Solved

How do I prevent requests from different methods within the same resource defaulting to GET?

I'm testing a REST API at work.    The REST API has many resource URIs. Now if I have a GET and a POST method under one resource URI and I add requests from both methods to a Test Case, upon openin...
  • forkbattery's avatar
    10 years ago

    I figured it out. For anyone having the same issue or wondering why this may be happening:

     

    I was giving the different methods (Get, Post, Delete), the same name, under one resource. 

     

    So for example if I had a resource named "bookid", I was calling the Get, Post and Delete methods all "bookid" for the sake of consistency in naming. But perhaps I was being too consistent. This is a bad idea. 

     

    I gave different names to each method under the same resource and it works fine now when adding it to the test case.