Neto Camarano
 · Founder NoCode StartUp

Put vs Patch - Is Xano doing this correctly?

According to HTTP Requests standards, the PUT method is normally used to overwrite all fields, while the PATCH is used to replace only information sent in the call.

This is not mandatory, but it is good practice.

By default, Xano creates GET, POST, PATCH, and DELETE calls when we automatically create CRUD endpoints after creating tables.

However, as far as I understand, this created PATCH endpoint actually acts as a PUT call.

Am I correct here? (This is my first question).

If this is true, wouldn't it be better by default for these calls to come as PUT instead of PATCH?

Furthermore, I realized that we don't have ready-made templates for PATH endpoints when we create the endpoint manually, we only have PUT.

I believe it would be interesting to have ready-made templates for PATCH endpoints, which actually act as a PATCH method

That would make it a lot easier and straightforward, also following the good practices.

I saw that this has also generated some other discussions here in the community, such as:
https://community.xano.com/ask-the-community/post/how-to-implement-the-patch-method-the-right-way-EIl2fGyQK2rAMjl

Could someone clarify whether my line of thinking is correct or am I not seeing something here?

Thank You!

6 replies