• Post Reply Bookmark Topic Watch Topic
  • New Topic

PUT and POST  RSS feed

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to understand the RESTful way here.
1. Consider invoice header and invoice lines. In Oracle, this will be 2 tables, but with MariaDB, this will be just one table. --> persistence perspective
2. Lets say I want to update an invoice, but not the whole invoice, but just the quantity of a line to a certain value in the invoice, will this be considered partial update? PUT or POST?
3. second case is I want to also update the quantity in a line by increasing it by two. partial update? most likely this will be POST?

when choosing PUT or POST, does the container or any other component of the stack behave differently, or is it just some kind of marker for all API user of expected behavior?
thanks
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Though not a convention, use POST to create new resources and use PUT to update existing resources.
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, I think it's more than that, since they differ in term of idempotence, but I'm also a bit confused how this would relate to partial/complete update.
thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!