Forum Discussion

aa1's avatar
aa1
Contributor
5 months ago

How to add same endpoints with different methods?

Hi,

I am trying to add two endpoints to Readyapi which are exact same but they have different methods. Readyapi does not allow me to add them. What am I missing? There has to be some way to add them.

endpoint 1 = POST  /api/names 

endpoint 2 = PATCH /api/names

Error:  Resource path "/api/names" already exist.

Thank you.

2 Replies

  • sdeevers_starz's avatar
    sdeevers_starz
    Occasional Contributor

    You should be able to add the first endpoint (POST), then clone the "request" (located under the "Method" hierarchy) and change the "type" on the cloned request to PATCH.

    Since the endpoint is the same you can have multiple "requests" with different types; GET, POST, PUT,DELETE, PATCH, etc.

    • aa1's avatar
      aa1
      Contributor

      It worked. Thank you so much.