Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Spring with Hibernate File Uploads and Entity Updates in Spring + Hibernate Updating Categories: Part 2

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Points

Should the HTTP method be ‘put’ for editing a category?

Just curious about when we use the other HTTP methods. It seems to be always POST or GET. I thought PUT was for updating a resource, which is what we seemed to be doing. Do some people just stick with POST and GET 100% of the time?

2 Answers

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Hi Brendan! I'm not sure if some people just stick to GET and POST, it's possible I suppose. But to answer your question, if you want to edit and replace something, PUT is what you want.

Here is a link if you would like to read more: http://www.restapitutorial.com/lessons/httpmethods.html

J llama
J llama
12,631 Points

what a horrible tutorial lol has us not using put for editing db data