Post vs Put

Options
I am just curious, why is XANO by default generating a POST endpoint to update/edit an object instead of making use of the PUT method.

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    HTTP verbs are a matter of preference and it is up to the user to decide how they want to use them. The PUT verb is intended to be used for replacing an object in its entirety. The POST verb is a more universal solution for updates since a lot of the time more functionality is happening than a complete object replacement.

    For example, one of the world's biggest payment vendors, Stripe, uses POST to update a subscription - Stripe API reference – Update a subscription
  • FJP H
    FJP H Member
    Options
    Thanks!